Method for Working with Logs

To work with logs, execute requests using the "logs" API method (determine user token before executing the request):

curl -X GET '<IP address or DNS server name>/api/v1/logs/schedule/' --header 'Authorization: Bearer <user token>' --header 'Accept: application/json'

The example of response:

{
    "trim": true,
    "schedule": "0 * 0 0 0 (m/h/dM/MY/dw)"
}

The response contains whether logs are deleted from a device after their sending to mobile platform server and schedule of sending logs in the cron format.

curl -X POST '<IP address or DNS server name>/api/v1/logs/push/' --header 'Authorization: Bearer <user token>' --header 'Content-Type: application/json' -d '[{"time": "<time>","level": "<level>","data": "<text description of log>"}]'

To use the <time>, <level> substitutions, take the following into account:

The example of response:

{
    "status": "OK"
}

After the log is successfully sent, it will be located in the System Logs subsection.

See also:

Server API | Method for Working with Push Notifications