Hello,
Is there a way to ignore login and logout via API?
Not login/logout logs exactly, but you can filter by topic… Only exact topic lists though (as they appear on the command line). The API protocol doesn’t yet support the “in” or “~” operators to let you match just a part of the topics.
In the case of login/logout, you’re looking for items with topics not equal to “system,info,account”. Items that ARE equal to “system,info,account” aren’t just successful logins and logsouts though. They are also failed login attempts. If you’re interested in getting just one or the other, you’d have to get both, and filter them on the client side by analyzing the message (e.g. with regular expressions).