Skip to content

Python API

Get api logs

moo = MailCow()
logs = moo.getRequest(section='logs/api/5')
moo.data = logs
print(moo.as_table())
+------------+----------------------------------+--------+-----------+------+
|    time    |               uri                | method |   remote  | data |
+------------+----------------------------------+--------+-----------+------+
| 1611102437 |      /api/v1/get/logs/api/5      |  GET   | xx.x.xx.x |      |
| 1611096182 | /api/v1/get/rl-mbox/xx@examp.com |  GET   | xx.x.xx.x |      |
| 1611087846 | /api/v1/get/rl-mbox/xx@examp.com |  GET   | xx.x.xx.x |      |
| 1611087808 |    /api/v1/get/logs/dovecot/5    |  GET   | xx.x.xx.x |      |
| 1611087797 | /api/v1/get/syncjobs/all/no_log  |  GET   | xx.x.xx.x |      |
+------------+----------------------------------+--------+-----------+------+

Last update: March 22, 2021

Comments