Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

difficulty filtering connections #126

Open
eduardofsj opened this issue Sep 16, 2024 · 0 comments
Open

difficulty filtering connections #126

eduardofsj opened this issue Sep 16, 2024 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@eduardofsj
Copy link

Hello, I have a tough question and I’m new to MikroTik. I want to get connection data for a specific IP, and I don’t want it to return all the data because the response would be too large and take too long. So, I would like to request only the information I need. I’m trying it this way:

$query = (new Query('/ip/firewall/connection/print')) ->where('dst-address', '192.168.1.200') ->operations('|');

It returns more connections than I want, but on the router, if I perform this search here, it works correctly and gives me the right result.

/ip/firewall/connection/print where dst-address~"192.168.1.200"

How do I make the API request to get the correct connections? I’m really struggling with this. I read through the MikroTik API documentation, but I still found it a bit confusing. Since you have more experience, maybe you can help me.

@eduardofsj eduardofsj added the question Further information is requested label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants