Community discussions

MikroTik App
 
tackerman
newbie
Topic Author
Posts: 29
Joined: Tue Jul 14, 2009 7:37 pm

Using /import with API

Tue Sep 28, 2010 6:19 pm

How do you specify the script file you want to run? I have tried adding an argument "filename=myscript.rsc" which resulted in a trap.

Thanks in advance . . .
 
SurferTim
Forum Guru
Forum Guru
Posts: 4637
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Using /import with API

Thu Sep 30, 2010 1:46 pm

I have not tried it, but it should be
/import
=filename=myscript.rsc
Requires two sends. The "/import" should be sent without the terminating zero. The "=filename=myscript.rsc" send should have the terminating zero.
 
tackerman
newbie
Topic Author
Posts: 29
Joined: Tue Jul 14, 2009 7:37 pm

Re: Using /import with API

Thu Sep 30, 2010 8:11 pm

I didn't post my exact api string correctly in my original post. I believe I'm sending it exactly as you, but I get a trap that reports 'unknown parameter'

Can you confirm if this indeed works for you or not?
 
SurferTim
Forum Guru
Forum Guru
Posts: 4637
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Using /import with API

Thu Sep 30, 2010 11:15 pm

EDIT: I can confirm it does work, but not with the parameters I tried. Try this:
/import
=file-name=myscript.rsc
ADD: They couldn't just use "=file=" like export? Jeez!!
 
User avatar
maximan
Trainer
Trainer
Posts: 549
Joined: Sat May 29, 2004 12:10 am
Location: Rio Cuarto, Argentina
Contact:

Re: Using /import with API

Fri Oct 01, 2010 7:31 pm

You can use fetch with auto for autoimport

M.
MKE Solutions > Professional Support IT (Spanish / English)
FastNetMon / FNM Manager: DDoS Detection Tools.

Who is online

Users browsing this forum: No registered users and 21 guests