Community discussions

MikroTik App
 
zevoxi
just joined
Topic Author
Posts: 6
Joined: Tue May 05, 2009 11:26 am

writing to config with api not working

Tue May 05, 2009 11:32 am

When I use the api it works great to retreve values. But everytime I try to set a value or just change something nothing happens. Its like its in some kind of readonly mode or something like that.

Any ideas? Its very frustrating :(
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: writing to config with api not working

Tue May 05, 2009 1:44 pm

what exactly is not working? I successfully work with Firewall Address Lists, inspect ARP Table via API, RouterOS v3.22

check that your API user have 'write' privilege
 
zevoxi
just joined
Topic Author
Posts: 6
Joined: Tue May 05, 2009 11:26 am

Re: writing to config with api not working

Tue May 05, 2009 1:46 pm

Nothing. cant change ssid or basic thinks like that. Hm where do I check if the write privileges are enabled?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: writing to config with api not working

Tue May 05, 2009 1:49 pm

Users - Groups

p.s. don't you receive any Traps from RouterOS?..
 
zevoxi
just joined
Topic Author
Posts: 6
Joined: Tue May 05, 2009 11:26 am

Re: writing to config with api not working

Tue May 05, 2009 8:29 pm

I have full read and write permissions.. It works if I send commands via telnet bur the api commands for setting values just dont work, and dosent return anything.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: writing to config with api not working

Tue May 05, 2009 11:27 pm

anything? even '!done'? then you probably send wrong command. didn't you forget the last empty word?
 
zevoxi
just joined
Topic Author
Posts: 6
Joined: Tue May 05, 2009 11:26 am

Re: writing to config with api not working

Tue May 05, 2009 11:41 pm

No I send the last 0 after.

/interface/wireles/nstreme/
=set=wlan1
=enable-nstreme=true

this is one command I try to use but nothing happens. reading the value works great though. Im I missing something? Im totaly new to the api funktions.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: writing to config with api not working

Wed May 06, 2009 6:45 pm

well, I don't know wireless command structure, but your commandd should be like this:

/interface/wireles/nstreme/set
=interface=wlan1
=enable-nstreme=true

what command do you use in CLI for this?
 
zevoxi
just joined
Topic Author
Posts: 6
Joined: Tue May 05, 2009 11:26 am

Re: writing to config with api not working

Thu May 07, 2009 12:37 am

Ah sorry just typed it wrong. The commands look exactly like yours. Now I have started to get !done as a response but still nothing happens.

everything works fine with standard cli command over telnet
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: writing to config with api not working

Thu May 07, 2009 2:05 am

if you are sure that you do it in right way, but nothing happens - please write to support with bug description (support@mikrotik.com)

unfortunately I cannot test this because I do not have a wireless interface, but with firewall all is working, as I said