get-logs

Use the interface to retrieve the logs as an administrator. The device can store up to 1000 local log entries.

HTTP Request

GET http://ip/mwapi?method=get-logs&types=xxx,xxx,xxx
Parameter Description
method get-logs
types Indicates the log types including all, info, warn, error, which can be separated by commas if multiple types are requested.

Response Body

{
 "status": 0,
 "logs": [
  {
   "type": "warn",
   "time": "2019-03-19 09:53:03.047",
   "message": "USB state: disconnected"
  },
  {
   "type": "warn",
   "time": "2019-03-19 09:14:09.292",
   "message": "User 'Admin' (192.168.66.2) session 4 timeout"
  },
  {
   "type": "warn",
   "time": "1970-01-01 00:00:11.872",
   "message": "USB state: disconnected"
  },
  ...
 ]
}
Name Description
status 0 indicates that the request was accepted successfully. Refer to API Status Codes to find specific description for other values.
logs Shows the log arrays, including log "type", generated "time" and "message" data.

Example

Retrieve all logs
http://192.168.66.1/mwapi?method=get-ptz-configmethod=get-logs&types=all
Retrieve warn and error logs
http://192.168.66.1/mwapi?method=get-ptz-configmethod=get-logs&types=warn,error

results matching ""

    No results matching ""