Community discussions

MikroTik App
 
serthan
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 61
Joined: Sat Jun 16, 2007 10:49 am

Api Search From Usermanager using C#

Wed Jun 28, 2017 12:34 pm

Hi All,
/tool user-manager user print where username~"23"
finding users that containing "23" in username like; 2345, 2323, 1234, ...
working fine, however in Api code it does not work correctly, just find correct username not containing string.

this is code.
mikrotik.Send("/tool/user-manager/user/print");
mikrotik.Send("?~username=23");
mikrotik.Send(".tag=userFind", true);

Tried all combination;
mikrotik.Send("?~username=23");
mikrotik.Send("?~username=*23*");
mikrotik.Send("?~username=:23");
mikrotik.Send("?~username~23");
mikrotik.Send("~username=23");
mikrotik.Send("?~username="23"");
mikrotik.Send("?~numbers=23");

is anybody know the correct syntax ?
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Api Search From Usermanager using C#

Wed Jun 28, 2017 1:42 pm

This feature is not yet supported by the API protocol in any way.

For now, you need to fetch all items over the wire, and filter them on the client side.
 
serthan
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 61
Joined: Sat Jun 16, 2007 10:49 am

Re: Api Search From Usermanager using C#

Thu Jun 29, 2017 1:26 am

This feature is not yet supported by the API protocol in any way.

For now, you need to fetch all items over the wire, and filter them on the client side.
Thanks for reply, Already doing this but 2500 client making time to fetch all data all time,
best regards.

Who is online

Users browsing this forum: dtomgr and 8 guests