Community discussions

MikroTik App
 
hotspotsolutions
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Thu Dec 16, 2004 1:48 pm

API Fetch Command in c# or vb.net anyone know how?

Thu Dec 09, 2010 1:40 am

Hi,

I am wondering if anyone has used the modules from the wiki (im using vb.net module) to issue the fetch command?

Does the module need enhancing, or can you just do it via the "Send" command??

Any ideas on the syntax?

any help is appreciated.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: API Fetch Command in c# or vb.net anyone know how?

Thu Dec 09, 2010 9:42 am

commands you can run in CLI can be executed using API and command will yield same result as if executed using API.
/tool/fetch
=url=http://demo.mt.lv/winbox/winbox.exe
 
hotspotsolutions
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Thu Dec 16, 2004 1:48 pm

Re: API Fetch Command in c# or vb.net anyone know how?

Thu Dec 09, 2010 2:48 pm

perfect, exactly what i'm after, will implement tomorrow, any hassles will advise.

thank you for the response, appreciate it.
 
mxmxmxmxmx
Frequent Visitor
Frequent Visitor
Posts: 68
Joined: Mon Aug 25, 2008 1:27 am

Re: API Fetch Command in c# or vb.net anyone know how?

Thu Feb 07, 2013 12:07 am

In 5.22 & 5.23:
06-02-2013 23.06.08 - info     102 - EXECUTE= /tool/fetch =url=http://demo.mt.lv/winbox/winbox.exe    
06-02-2013 23.06.08 - DEBUG    11001 - 10.9.8.1 tr_mkrouter.msend /tool/fetch
06-02-2013 23.06.08 - DEBUG    11001 - 10.9.8.1 tr_mkrouter.msend =url=http://demo.mt.lv/winbox/winbox.exe
!re=status=connecting
!re=status=finished
!re=status=finished
!re=status=finished
!re=status=finished
!re=status=finished
!re=status=finished
!re=status=finished
!re=status=finished
!re=status=finished
!re=status=finished
!re=status=finished
06-02-2013 23.06.19 - Warning  112 - 
06-02-2013 23.06.19 - Warning  114 - EXECUTE= /CANCEL
06-02-2013 23.06.19 - DEBUG    11001 - 10.9.8.1 tr_mkrouter.msend /cancel
!trap=category=2=message=interrupted
!done
!done
:(
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: API Fetch Command in c# or vb.net anyone know how?

Thu Feb 07, 2013 11:19 am

Yeah. This is a known issue in RouterOS 5.*. It is already fixed in the upcoming RouterOS 6, from what I've read elsewhere in the forum.

In the meantime - you need to check each response, and "/cancel" the command once the status is "finished".

I'm not sure how you do that with any .NET client, but it seems like the only .NET client to have such an ability would be mikrotik4net.

Who is online

Users browsing this forum: No registered users and 53 guests