I have coded a program in java to change pppoe user bandwidth on the fly via java API. when i use “/ip/address/print” command it give proper output, but when i try to update the user bandwidth with command “/queue/simple/set/numbers=[/queue/simple/find/where =name =""] =max-limit="2048k"” . it gives “!trap =message=no such command”.
Arguments are written as separate words in form of “=name=value”, without quotes, and this includes the “numbers” argument.
To do setting, you need to do “print” request, with a query that matches what you want, get the ID, and pass that to the “numbers” argument of the “set” command.
With simple queues in particular though, you can actually skip the print request - just use the queue’s name instead of its ID. Like:
API protocol states how the communication have to be done over the network. On the other hand, it is possible to use other methods provided to send as you would like - one command at a time, however, if you are not setting scripts up then this approach results in less packages sent over the network (and that was important for me when i wrote it)