hi guys
I use this comment to print out the profiles with details in my MT
mikrotik.Send("/ip/hotspot/user/profile/print", True)
but i want print just the profile name without details .
Thanks
hi guys
I use this comment to print out the profiles with details in my MT
mikrotik.Send("/ip/hotspot/user/profile/print", True)
but i want print just the profile name without details .
Thanks
use proplist to filter your results.
I suggest to use it always to make the response lighter on every api request.
thanks Medianet for replay
can you give me example ? because I’ve used this code but not working ![]()
mikrotik.Send("/ip/hotspot/user/profile/print", False)
mikrotik.Send("=.proplist=.id", False)
thanks a lot ..
.id is only a id number of what are you looking for, used in api itself. You might need to add to the proplist the “name” field
mikrotik.Send("/ip/hotspot/user/profile/print", False)
mikrotik.Send("=.proplist=.id,name", True)
the result is ![]()
!trap=message=no such command prefix!done
thanks for help
Which version is installed? If I remember correctly proplists and queries were added in 3.21
version 3.30
seems like wrong usage of second argument (“, False)”). what programming language do you use?
hi Chupaka
i use vb.net
thanks
huh, I cannot find VB.Net implementation at http://wiki.mikrotik.com/wiki/API#API_examples_in_the_Wiki
in general, seems like you send “=.proplist=.id,name” as separate command…
this code is working ![]()
mikrotik.Send("/ip/hotspot/user/profile/print")
mikrotik.Send("=.proplist=name", True)
without writing any parameter in the first line
thanks ..
In PHP if you want to use more than two commands use False parameter in each write function to wait for the next command as in this
$API->write(‘/queue/simple/print’,false);
$API->write(‘=.proplist=.id,name’,false);
$API->write(‘=stats=’);
$ARRAY = $API->read();
print_r($ARRAY);
If we set it to boolean true, the funcion will send the comand and finish
If we set it to boolean false, the funcion will send the comand and wait for next command
Default: true