Richad
December 13, 2010, 11:57am
1
Hi!,
I’ve would like to know the way for remove an IP ROUTE.
Print command dosen’t give me any id or number, and I’ve tried to remove it by comment but it doen’t work.
Anyone could help me?
thanks a lot!.
Send(“/ip/route/remove”);
Send(“=comment=myComent”, true);
mrz
December 13, 2010, 12:09pm
2
You must use queries
http://wiki.mikrotik.com/wiki/API#Queries
/ip/route/remove
?=comment=myComment
Richad
December 13, 2010, 12:59pm
3
this command doesn’t work. Response is !done but the Route item is still there.
/ip/route/remove
?=comment=myComment
did you test it before?
Any other idea?
Thanks.
mrz
December 13, 2010, 1:09pm
4
/ip/route/getall
=.proplist=.id
?=comment=myComment
Will return an ID
!re
=.id=*A
!done
Then use that ID to remove the route
/ip/route/remove
=.id=*A
Richad
December 13, 2010, 3:52pm
5
Thanks for your reply again.
The query seems work.,
Send(“/ip/route/getall”);
Send(“=.proplist=.id”);
Send(“?=comment=myComment”, true);
but later the read() method I use, posted in http://wiki.mikrotik.com/wiki/API_in_C_Sharp doesn’t work correctly.
Any other solution? or any otrer way to read the ip route item id?
Thanks.
Richad
December 13, 2010, 4:04pm
6
Debugging the Read() method I can see that the reply just return 3 strings:
1_ re!
2_ empty string
3_ !done