You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLI and API have some differences syntatically wise.
The main difference is the absence of some way to set something by another property than .id, so in API you need to first get the .id of the row you want to change and after pass it as numbers property value.
Your example, inside the library, can be written as follows:
List<Map<String, String>> res = session.execute(new Command("/interface/wireless/print",
new CommandQueryExpression("name", CommandQueryOperation.EQUALS, "wlan1")));
Map<String, String> attrs = new HashMap<String, String>();
attrs.put("frequency", "2142");
attrs.put("numbers", res[0][".id"]);
session.execute(new Command("/interface/wireless/set", attrs));
Hi,
I can run following code on terminal successfully,
/interface wireless set wlan1 frequency=2412
but when I try to run over API, it gives me the following error:
MikrotikConnectionException error: no such command or directory
How can change frequency via API?
Cheers,
The text was updated successfully, but these errors were encountered: