I use api for set queue for customer,but the result that return is :
Policy !trap=message=no such item.tag=username!done.tag=username
why ?
I use api for set queue for customer,but the result that return is :
Policy !trap=message=no such item.tag=username!done.tag=username
why ?
How does your request look and what is the RouterOS version you’re using?
on this router and with this code , every thing is correct but sometimes occur this error,not always
If you’re targeting the queue by ID instead of a name, you should keep in mind that IDs may change as you add/remove/move queues, which could be the reason why it sometimes works, and sometimes not. Target queues by their name instead.
means that when i want to set queue for a customer, i should send username no id ? if yes, customer’s id is unique and not change
I mean use the queue name. If the queue name is the customer’s ID, then the customer ID it is.
So if the name of your queue is “CustomerID-1234”, then make the request be something like:
/queue/simple/set
=numbers=CustomerID-1234
=max-limit=10M/10M
I use below codes
/queue/simple/set
=.id=<pppoe-CUSTOMERUSERNAME>
=max-limit=10M/10M
That should be equivalent to the above, so that’s not the problem.
What RouterOS version are you using? There was a bug in recent versions about added/modified items (not just queues…) not being made available to scripts/API until a whole second after the fact. I don’t remember the exact version, but it should certainly already be fixed in 6.7.
Nice post!
our RouterOS version is 6.7