\WolfRecorder
WolfRecorder NVR REST APIv1 implementation
https://wolfrecorder.com/wiki/doku.php?id=api
Synopsis
class WolfRecorder
{
- // constants
- const ROUTE_CALL = '/?module=remoteapi&action=rest&key=';
- // methods
- public void __construct()
- protected void setUrl()
- protected void setApiKey()
- protected array executeRequest()
- public bool noError()
- public array connectionOk()
- public array modelsGetAll()
- public array storagesGetAll()
- public array storagesGetStates()
- public array camerasGetAll()
- public array camerasCreate()
- public array camerasActivate()
- public array camerasDeactivate()
- public array camerasSetDescription()
- public array camerasDelete()
- public array camerasIsRegistered()
- public array systemGetHealth()
- public array systemCheckConnection()
- public array usersGetAll()
- public array usersCreate()
- public array usersChangePassword()
- public array usersIsRegistered()
- public array usersDelete()
- public array usersCheckAuth()
- public array aclsGetAll()
- public array aclsGetAllCameras()
- public array aclsGetAllChannels()
- public array aclsGetChannels()
- public array aclsGetCameras()
- public array aclsAssignCamera()
- public array aclsAssignChannel()
- public array aclsDeassignCamera()
- public array aclsDeassignChannel()
- public array channelsGetAll()
- public array channelsGetScreenshot()
- public array channelsGetScreenshotsAll()
- public array channelsGetLiveStream()
- public array recordersGetAll()
- public array recordersIsRunning()
Constants
Name | Value |
---|---|
ROUTE_CALL | '/?module=remoteapi&action=rest&key=' |
Members
protected
- $apiKey
—
string
Current instance API key aka Serial - $url
—
string
Current instance WolfRecorder URL
Methods
protected
- executeRequest() — Performs request to remote WolfRecorder REST API, returns it result
- setApiKey() — Sets current instance API key
- setUrl() — Sets current instance URL
public
- __construct() — Creates new WR API instance
- aclsAssignCamera() — Creates ACL for some user by cameraId
- aclsAssignChannel() — Creates ACL for some user by channelId
- aclsDeassignCamera() — Deletes ACL for some user by cameraId
- aclsDeassignChannel() — Deletes ACL for some user by channelId
- aclsGetAll() — Returns all ACLs raw data
- aclsGetAllCameras() — Returns array of all available user to cameras ACLs
- aclsGetAllChannels() — Returns array of all available user to channels ACLs
- aclsGetCameras() — Returns array of channels assigned to some user as channelId=>cameraId
- aclsGetChannels() — Returns array of channels assigned to some user as channelId=>cameraId
- camerasActivate() — Activates existing camera
- camerasCreate() — Creates new camera on NVR
- camerasDeactivate() — Deactivates existing camera
- camerasDelete() — Deletes existing camera
- camerasGetAll() — Returns array of all available cameras data as:
- camerasIsRegistered() — Checks is camera registered or not by its IP
- camerasSetDescription() — Changes existing camera description
- channelsGetAll() — Returns all available channels as channelId=>cameraId
- channelsGetLiveStream() — Returns some channel live preview pseudostream URL as error/livestream
- channelsGetScreenshot() — Returns some channel screenshot URL as error/screenshot
- channelsGetScreenshotsAll() — Returns all channels screenshots URLs as channelId=>screenshotUrl
- connectionOk() — Fast check is API connection ok or not
- modelsGetAll() — Returns list of all available models as modelId=>modelsData[id/modelname/template]
- noError() — Fast check for some request is returning error or not?
- recordersGetAll() — Returns list of running recorders as cameraId=>PID
- recordersIsRunning() — Returns some camera recording process state
- storagesGetAll() — Returns list of available storages as storageId=>storagesData[id/path/name]
- storagesGetStates() — Returns list of all storages states as storageId=>statesArr[state/total/used/free]
- systemCheckConnection() — Returns system non empty array to connection check error/connection/message
- systemGetHealth() — Returns system health data as storages/database/network/channels_total/cahnnels_online/uptime/loadavg
- usersChangePassword() — Changes some existing user password to new one
- usersCheckAuth() — Checks can be user authorized or not
- usersCreate() — Creates new limited user
- usersDelete() — Deletes an existing user
- usersGetAll() — Returns all available users data
- usersIsRegistered() — Checks is user registered or not