how to write “/interface vlan remove [/interface vlan find name=<customer_name>]” to API language?
The return result is not only the .id values but also has other value(.tag…) which i will need to do string manipulation in order to get only the .id value, right?
well, if you use tagging - then yes, you will receive ‘.tag’. nothing else (because of “.proplist=.id”)
I am not sure about this .tag.
how to take it? So, i will get only the .id value that is easy for to pass to another command.
if you don’t use tagging (e.g. simultaneous command execution), then you’ll get only ‘.id’
can you give out an example without .tag? so, we can execute the commands simultaneously.
please!!
tagging is for simultaneous executing. do you need it at all?..
can you translate this “/interface vlan remove [/interface vlan find name=<customer_name>]” to
API? (C# language)
have you read that? http://forum.mikrotik.com/t/api-acl-control/29390/1
find 10 differences:
/interface wireless access-list remove [find comment=teste]
and
/interface vlan remove [/interface vlan find name=<customer_name>]
![]()
I was stuck at .tag or passing the result of one command to another.
A complete example would be very helpful. ![]()
okay, I was asking, now I’m asserting: you do NOT need ‘.tag’, forget about it!
only for you, a complete example:
first, you should get .id of that entry:
/interface/vlan/print
.proplist=.id
?name=<customer_name>
then remove necessary items:
/interface/vlan/remove
=.id=<your_id_here>
is that enough?.. ![]()
I don’t know about peculiarities of C# API implementation
.tag is used to make difference from one command and other when running simultaneous commands to the router. Also, .tag can be uses id you want to cancel execution of the some command, for example, if you run command that will never end, then only way to stop it is to use /cancel but it will cancel all commands. If you have .tag for command you can cancel that one command.