Page 1 of 1

Complete DELPHI API client: update 4

Posted: Fri Jan 02, 2009 1:19 pm
by rodolfo
update 4:
- rewritten mrecv functions to avoid errors when output contains #0
- faster output reducing timer interval between two sentences
- now empty password are allowed
- added output to log file

update 3:
- created wiki page http://wiki.mikrotik.com/wiki/API_Delphi
- minor updates in api_studio_104

The download contain the source code of a Delphi class (and of a demo application) to simply interface the routerOS API.
Please refer to http://wiki.mikrotik.com/wiki/API_Delphi for more informations.

LAST VERSION
api_studio_108.zip
Please report me suggestions, errors and so on.

Thanks.

Re: Complete DELPHI API client

Posted: Thu Jan 08, 2009 6:53 pm
by cmit
Hi Rodolfo,

the included compiled EXE does work OK here. Compiling the source with Delphi 6 works (after hacking in a replacement for PosEx, which is not there in Delphi 6), but the tool hangs during opening the connection to the router. Actually it stalls in tr_mkrouter.open while waiting for the response for the first "/login" command. That's in this line:
hash:=ex_val(res,'ret','',false);
Any idea?

Re: Complete DELPHI API client

Posted: Fri Jan 09, 2009 1:16 am
by cmit
Nevermind. Seems to be a bug with the version of the synapse library contained in your download.
I checked out the latest revision from SVN (rev. 95) and it started working right away ;-)

Re: Complete DELPHI API client

Posted: Tue Jan 13, 2009 9:27 am
by xbaha
where did you download synapse from?

Re: Complete DELPHI API client

Posted: Tue Jan 13, 2009 5:03 pm
by rodolfo
Main site http://www.ararat.cz/synapse/doku.php/download
Last version: https://synalist.svn.sourceforge.net/sv ... ist/trunk/

cmit: thanks, I updated the main thread with last library

Re: Complete DELPHI API client

Posted: Wed Jan 14, 2009 4:24 am
by xbaha
i have tried this software its great, i would like to know why it doesnt handle streaming data from the router,
for example: i am trying this command /tool ping 192.168.100.1

one time i get this:
14/01/2009 05.21.50 - 142 -
14/01/2009 05.21.50 - info 102 - EXECUTE= /tool ping 192.168.100.1
14/01/2009 05.21.50 - info 103 - =!done=

and the other time i get this (why?) :
14/01/2009 05.23.57 - 142 -
14/01/2009 05.23.57 - info 102 - EXECUTE= /tool ping 192.168.100.1
14/01/2009 05.23.57 - #ERROR# 10004 - 192.168.100.1 tr_mkrouter.mrecv !trap==!trap=message=no such command=
14/01/2009 05.23.57 - info 103 - =!trap=message
=no such command=

Re: Complete DELPHI API client

Posted: Thu Jan 15, 2009 12:37 pm
by janisk
ping works differently using api, than usual ping in terminal

on api, you get result of how many pings sent, and how many you received back, so you have to set =count=<some number> allways

or it will run until you issue cancel command to cancel your ping.

Re: Complete DELPHI API client

Posted: Thu Jan 15, 2009 9:06 pm
by pedja
I have Delphi 5 and could not compile without some tweaking:

- as StrUtil unit is missing. I found it at http://www.koders.com/delphi/fidDF48A5F ... x?s=delphi, copied code from site and saved it as StrUtils.pas in project directory.

- Sleep() function was not available in uUtils.pas, so I had to add Windows in uses in this unit

- in uMain.pas I had to remove Variants form uses


Then project compiled, and executable works fine. Good job.

Re: Complete DELPHI API client

Posted: Thu Jan 15, 2009 10:08 pm
by pedja
I tried /ping =address=10.50.10.13 =count=3 and it works ok, but returns just number of successful ping. Is there an option to get all ping details?

Re: Complete DELPHI API client

Posted: Thu Jan 15, 2009 11:13 pm
by pedja
Response string is not parsed properly.

It is very strange that = is uset to delimiter both items and item name and value. It is very tricky to parse.

Here is an example:

=!re=.id=*6=name=wan-adsl=mtu=1500=mac-address=00:41:05:4F:82:DA=arp=enabled=disable-running-check=yes=auto-negotiation=yes=full-duplex=yes=cable-settings=default=speed=100Mbps=running=yes=slave=no=comment==disabled=no==

It's hard to distinguish which part is item name and which one is item value.

Is it possible to change these delimiters?

Re: Complete DELPHI API client

Posted: Fri Jan 16, 2009 9:37 am
by janisk
if you try other example and sniff for actual API traffic you will notice that there is symbol in between the lines and your output of :
=!re=.id=*6=name=wan-adsl=mtu=1500=mac-address=00:41:05:4F:82:DA=arp=enabled=disable-running-check=yes=auto-negotiation=yes=full-duplex=yes=cable-settings=default=speed=100Mbps=running=yes=slave=no=comment==disabled=no==

actually looks more like:
=!re
=.id=*6
=name=wan-adsl
=mtu=1500
=mac-address=00:41:05:4F:82:DA
=arp=enabled
=disable-running-check=yes
=auto-negotiation=yes
=full-duplex=yes
=cable-settings=default
=speed=100Mbps
=running=yes
=slave=no
=comment=
=disabled=no
==
now, compare what i get when issue the command in my implementation:
!re
=.id=*1
=name=ether1
=mtu=1500
=mac-address=00:0C:42:2D:80:06
=arp=enabled
=auto-negotiation=yes
=full-duplex=yes
=speed=100Mbps
=running=yes
=slave=no
=comment=
=disabled=no
as far as i can remember - each line have value preceding the line, that shows how many symbols there is in the line, hence, always it will be like =some-arg=value and value will be everything till the end of line after 2nd "="

either fix that in the code or ask someone to do that for you

Re: Complete DELPHI API client

Posted: Fri Jan 16, 2009 7:32 pm
by pedja
Right! :) Silly me, I forgot that I am not getting data directly from Mikrotik but from intermediate layer which was messed up. I got it now. Thanks.

Re: Complete DELPHI API client

Posted: Sat Jan 17, 2009 6:20 pm
by rodolfo
I entierely rewritten the library, taking in account the correct numbering of the send commands and !done received.

Now commands link /tool/ping =address=19.19.18.17 works well, as the others command.

Thanks for suggestions.

You could download from main post.

Rodolfo

Re: Complete DELPHI API client: update 3

Posted: Sun Jan 18, 2009 1:13 pm
by rodolfo
I published a wiki page and update a little the code.
thanks

Re: Complete DELPHI API client: update 3

Posted: Mon Mar 23, 2009 11:04 am
by Chupaka
oops, example application do not work with empty password =)

Re: Complete DELPHI API client: update 3

Posted: Wed Apr 01, 2009 1:26 am
by Chupaka
also, this class do not work correctly with replies, containing #0 in parameter value, because it is designed to think that #0 is the end of sentence. so, for example, I cannot get normal list of my DHCP server leases, where Agent-Circuit-ID is MAC address of switch and contains #0 in it

I see something like the following:
=!re=.id=*3952
<...text here...>
=src-mac-address=00:1E:58:49:EF:F1
=agent-circuit-id=
==agent-remote-id
=
=XIпс=radius
=true
=dynamic
=tru=
=blocked=false
p.s. why is this implementation so slow?.. mine is based on Synapse too, and prints output much faster... I hope some day I will public it, I just began to code...

Re: Complete DELPHI API client: update 4

Posted: Sun Apr 05, 2009 11:54 am
by rodolfo
Hi Chupaka, thanks for suggestions.
I have updated the code and:
1. empty passwords could be allowed
2. I rewritten mrecv function. Now I have a better implementation of the protocol and #0 char works well
3. I reduced a lot the timer interval between the receive of two sentences and the output is much faster.

Re: Complete DELPHI API client: update 4

Posted: Sat May 23, 2009 4:21 pm
by tkwak
Dear rodolfo:

I am using the API to develop an control software as 'Mini-winbox', now i face an trouble with the api.
when i want to issuse the command like '/ip/router/unset .id=*2 routing-mark' , i get get an argument error.

How to using unset command through RouterOS API?

I have ask this question 1 year before, but no body can answer me as well, Would u like to help me on this ? Thank u very much~!

Re: Complete DELPHI API client: update 4

Posted: Sat May 23, 2009 8:27 pm
by Chupaka
did you asked support@mikrotik.com ?

Re: Complete DELPHI API client: update 4

Posted: Sun May 24, 2009 8:07 am
by tkwak
ya,,, not yet ,i think i need to report to them too, thx Chupaka

Re: Complete DELPHI API client: update 4

Posted: Sun May 24, 2009 3:19 pm
by Chupaka
please post here any news about unset =)

Re: Complete DELPHI API client: update 4

Posted: Fri Jun 19, 2009 11:59 pm
by geraldospint
Hello,
how to send this comando to router using api "/interface wireless access-list add mac-address=00:11:22:33:44:55 interface=AP-1 authentication=yes forwarding=no comment= TESTE"

Re: Complete DELPHI API client: update 4

Posted: Sat Jun 20, 2009 7:26 pm
by Chupaka
Hello,
how to send this comando to router using api "/interface wireless access-list add mac-address=00:11:22:33:44:55 interface=AP-1 authentication=yes forwarding=no comment= TESTE"
hm...
/interface/wireless/access-list/add
mac-address=00:11:22:33:44:55
interface=AP-1
authentication=yes
forwarding=no
comment= TESTE
should work

Re: Complete DELPHI API client: update 4

Posted: Wed Jul 15, 2009 2:14 pm
by tkwak
It works, you have to specify value-name
for example
/ip/route/unset
=.id=*1
=value-name=routing-mark

Re: Complete DELPHI API client: update 4

Posted: Wed Sep 02, 2009 11:08 pm
by gcakici
Hi Rodolfo,

I've download your last version of API and try to work it out on Delphi 2009. It just don't work at all. MD5 library has been changed some how https://forums.codegear.com/thread.jspa ... eID=114098. Synapse library has also throwing some problems when i try to use.

As you can understand i'm not a Delphi fun but i need to work with your library. It will be much better if you can update your downloadable file with the proper .pas files.

Thanks for your work already.

Gokalp

Re: Complete DELPHI API client: update 4

Posted: Wed Sep 30, 2009 4:31 pm
by ekkas
I would also love to use it, but can't even compile in D2009.
Are you still updating these units from time to time or plan to update to D2009?

thanks

Ekkas

Re: Complete DELPHI API client: update 4

Posted: Thu Oct 01, 2009 1:48 pm
by rodolfo
I will try at the beginning of next week.

Re: Complete DELPHI API client: update 4

Posted: Thu Oct 01, 2009 3:24 pm
by ekkas
Thanks a lot. We'll all appreiate it.

Re: Complete DELPHI API client

Posted: Sat Dec 05, 2009 2:09 pm
by mosman
ping works differently using api, than usual ping in terminal

on api, you get result of how many pings sent, and how many you received back, so you have to set =count=<some number> allways

or it will run until you issue cancel command to cancel your ping.
Well, is there any way to get ping response delay in ms? Is there an extra parameter to "/ping" to fetch full information?

Is there an way to set environment variables via API?

Why when I run scripts via API /system/script/run the environment variables remain unchangend?


Regards, Andrei.

Re: Complete DELPHI API client

Posted: Tue May 18, 2010 9:42 am
by manuelritter
ping works differently using api, than usual ping in terminal

on api, you get result of how many pings sent, and how many you received back, so you have to set =count=<some number> allways

or it will run until you issue cancel command to cancel your ping.
Well, is there any way to get ping response delay in ms? Is there an extra parameter to "/ping" to fetch full information?
Hello,

I am also very interested in full ping information from API.
Is there any way to fetch full information or is it possible to add in future versions?

Greetings
Manuel Ritter

Re: Complete DELPHI API client: update 4

Posted: Tue May 18, 2010 1:40 pm
by janisk
lets wait for 5.0beta3 public release

in wiki you already can see new output format

http://wiki.mikrotik.com/wiki/API_comma ... _and_newer

edit: it will not change for v4 thought.

Re: Complete DELPHI API client: update 4

Posted: Sat Sep 01, 2012 5:58 pm
by leonardocx
I wonder if there is to build this api delphi XE2, I'm doing some tests and conseigo run this application in delphi 7 but not in XE2 realized ..... update the MD5 and sokets, according to the ICS v7. but the application returns me this message ...
01/09/2012 11:56:58 - info 103 - connecting to 192.168.2.100
09.01.2012 11:56:58 - DEBUG 11001 - 192.168.2.100 tr_mkrouter.msend / login
09.01.2012 11:56:58 - DEBUG 11001 - 192.168.2.100 tr_mkrouter.msend / login
09.01.2012 11:56:58 - DEBUG 11001 - tr_mkrouter.msend = 192.168.2.100 name = admin
09.01.2012 11:56:58 - DEBUG 11001 - = 192.168.2.100 tr_mkrouter.msend response = 0072305e1275f4e0584561fb682e455939
01/09/2012 11:56:58 - # ERROR # 10008 - 192.168.2.100 tr_mkrouter.open opening router error =! Trap = message = can not log in
even with a valid password, the logs are OK RB disendo that there was a connection attempt api but login error!

Re: Complete DELPHI API client: update 4

Posted: Wed Oct 31, 2012 11:21 pm
by pvidal
Hello! I just downloaded the API for Delphi. I tested many commands with the example app but /system/reboot doesn't work.

Any clue?

Thanks in advance!

Re: Complete DELPHI API client: update 4

Posted: Fri Nov 02, 2012 1:08 pm
by Chupaka
/system/reboot works fine for me. at least on 6.0rc3 =)

Re: Complete DELPHI API client: update 4

Posted: Thu Nov 15, 2012 5:39 pm
by DogHead
/system reboot in 5.21 requires interactive confirmation as does /system upgrade

/system auto-upgrade requires interactive password

Using ROS scripting you cannot respond to these requests, rendering all scripts that use these commands useless. The right way to fix the problem is eliminate the interactive confirmation, or bypass it when called from a script rather than the console. This would take work by MT.

Alternatively, could someone write a binary that can run on a router that can deal with this? I am not a coder so don't know what is involved.

Re: Complete DELPHI API client: update 4

Posted: Thu Nov 15, 2012 6:58 pm
by biomesh
/system reboot in 5.21 requires interactive confirmation as does /system upgrade

/system auto-upgrade requires interactive password

Using ROS scripting you cannot respond to these requests, rendering all scripts that use these commands useless. The right way to fix the problem is eliminate the interactive confirmation, or bypass it when called from a script rather than the console. This would take work by MT.

Alternatively, could someone write a binary that can run on a router that can deal with this? I am not a coder so don't know what is involved.
/system reboot works fine for me in a script on a 5.21 x86 box

Re: Complete DELPHI API client: update 4

Posted: Fri Nov 16, 2012 2:50 am
by DogHead
On mipsbe 411GL and 433 we get a prompt for Are you sure?

Scripts fail every time on this. Cannot put in a Y response.

Re: Complete DELPHI API client: update 4

Posted: Fri Nov 16, 2012 5:00 am
by biomesh
I can try on a 751G tomorrow.

Sent from my Nexus 7 using Tapatalk 2

Re: Complete DELPHI API client: update 4

Posted: Fri Nov 16, 2012 12:17 pm
by Chupaka
"/system reboot" in Terminal always required confirmation, and at least since long time ago it's not requiring it in scripts. check that your script has necessary permissions

Re: Complete DELPHI API client: update 4

Posted: Fri Nov 16, 2012 4:33 pm
by biomesh
Works as expected on a 751G - I would have to agree with Chupaka and make sure the permissions are correct.

If you are using an API to send these commands, they are probably being interpreted as being interactive. I would try to send the commands via the script interface. This could be done via a rsc file or just run the /system script command to create the scripts to be run and either execute the script via /system script run or add a scheduler entry.

Re: Complete DELPHI API client: update 3

Posted: Sat Nov 24, 2012 6:45 pm
by stbox
hi
i want to send a command Instead of parametr in api
/ppp/active/remove
=.id=*25
i want send a command like this
=id.=[find name=ppp1]
this command not work

totally i can this work with api ?
if true
please help

Re: Complete DELPHI API client: update 4

Posted: Mon Nov 26, 2012 5:52 pm
by Chupaka
you need first find necessary ids, then remove them

Re: Complete DELPHI API client: update 4

Posted: Sun Sep 15, 2013 10:01 am
by esmit61
Hi,
I want to disconnect a vpn user (named "test") and send this command:
/ppp/active/remove =[find name=test]

but it doesn't disconnect :(
would you please help me how should i write the command?

Regards,
esmit

Re: Complete DELPHI API client: update 4

Posted: Tue Sep 17, 2013 1:02 am
by Chupaka
first
/ppp/active/print
=.proplist=.id
?name=YOUR_NAME_HERE
then
/ppp/active/remove
=.id=YOUR_ID_HERE

Re: Complete DELPHI API client: update 4

Posted: Sat Sep 21, 2013 11:25 pm
by esmit61
So thanks, It worked.
I have another problem,
RouterOs.pas works with delphi 7, but when i run it with delphi XE4 it dousn't work
I get error in RouterOs.Connect. it returns False and RouterOS.LastError returns: "Host not found" !!!
i can ping the host and user pass are correct. furthermore i can connect with delphi 7 !!!
Please Help me
sorry for my English

Re: Complete DELPHI API client: update 4

Posted: Tue Sep 24, 2013 7:19 pm
by Chupaka
Sorry, I can't help with that. You can check my client here - it works with Delphi 2009, probably it will work with XE4

Re: Complete DELPHI API client: update 4

Posted: Wed Jan 06, 2016 9:54 pm
by DimebagDarrell
Delphi X
[dcc32 Error] md5.pas(343): E2064 Left side cannot be assigned to
[dcc32 Fatal Error] api_studio.dpr(46): F2063 Could not compile used unit 'md5.pas'
Error:
function GetMD5(Buffer: Pointer; BufSize: Integer): string;
var
    I          : Integer;
    MD5Digest  : TMD5Digest;
    MD5Context : TMD5Context;
begin
    I := 0;
    for I := 0 to 15 do
    		Byte(MD5Digest[I]) := I + 1;  >>>>>>>>>> ERROR
    MD5Init(MD5Context);
    MD5UpdateBuffer(MD5Context, Buffer, BufSize);
    MD5Final(MD5Digest, MD5Context);
    Result := '';
    for I := 0 to 15 do
        Result := Result + IntToHex(Byte(MD5Digest[I]), 2);
end;

Re: Complete DELPHI API client: update 4

Posted: Wed Jan 06, 2016 10:02 pm
by BartoszP
What is Byte() ?

Re: Complete DELPHI API client: update 4

Posted: Thu Jan 07, 2016 1:38 pm
by Chupaka
What is Byte() ?
a type cast?..

Re: Complete DELPHI API client: update 4

Posted: Thu Jan 07, 2016 2:03 pm
by BartoszP
Just asking to confirm. I have not used Delphi for ages.
I is Integer, Byte is byte wide so how to assign integer to byte ? .... IMHO should be:
Byte(MD5Digest[I]) := Byte(I + 1);
What type is MD5Digest ?
Maybe it is better to convert I+1 directly to MD5Digest ?

This could help:
http://stackoverflow.com/questions/4161 ... ssigned-to

Re: Complete DELPHI API client: update 4

Posted: Tue Mar 28, 2017 9:20 am
by jeremycoulter
I ran into this problem yesterday too when converting from an old Delphi 2007 project to Delphi 10.2.
Fortunitly i have had this problem before and all you need to do is the following:

In the OPEN() function, change
enpa:=encode_password(password,hash);
to
enpa:=encode_password(AnsiString(password),AnsiString(hash));
Then change the encode_password function to the followiing:
function TRouterOS.encode_password(passw, hash: Ansistring): string;
var
  ac, temp: Ansistring;
  pc: Array of ANSIChar;
  i, lp: integer;
begin
 if (hash<>'') and (passw<>'')
  then begin
        lp:=length(passw);
        setlength(pc,1+lp+16);
        pc[0]:=#0;
        move(passw[1],pc[1],lp);
        for i:=0 to 15
         do begin
             ac:=copy(hash,i*2+1,2);
             if ac<>''
              then pc[1+lp+i]:=AnsiChar(StrToInt('$' + ac));
            end;
        temp:=GetMD5(@pc[0], 1+lp+16);
       end
  else begin
        temp:='#error#';
       end;
 result:=lowercase(temp);
end;
Also update to the latest OverByte ICS controls and I also downloaded, and also head over to http://delphi.cz/img/synapseandroid/synapse_2.zip to get an updated Synapse library. It will talk about being for Android and iOS, but I just took the files in the "Lib" folder in the zip file and replaced the ones I had in my old Synapse folder.

Hope that helps.

Jeremy

Re: Complete DELPHI API client: update 4

Posted: Wed Apr 05, 2017 5:47 pm
by marcelosantos
Hello, I have the following need

I need to print / list all my PPP secrets that are not online

I can list all the names with the code
/ppp/secret/print
=.proplist=name
The answer at the exit is
!re=name=marcelo
!re=name=xxxxxx
....
I can't do is get these names and search with the following script
:global list ""; 
:foreach i in [/ppp active find] do={:if ([:find \
[/ppp active get $i name] "m"]=0) do={:set list ($list . "," . $i);}}; \
/ppp active print detail without-paging from  $list; 
change "m" for names

Can someone help me?

Re: Complete DELPHI API client: update 4

Posted: Thu Apr 06, 2017 2:11 pm
by Chupaka
You first get all ppp secrets with "/ppp/secret/print", then get all online secrets with "/ppp/active/print", then you process the lists in your Delphi program, by excluding second list from the first :)

Re: Complete DELPHI API client: update 4

Posted: Thu Apr 06, 2017 10:27 pm
by marcelosantos
True, I spent so much time trying to do with script that I did not think of using logic in delphi

Thank's

Re: Complete DELPHI API client: update 4

Posted: Fri Jun 02, 2017 1:41 am
by Ishtiaque
You first get all ppp secrets with "/ppp/secret/print", then get all online secrets with "/ppp/active/print", then you process the lists in your Delphi program, by excluding second list from the first :)
Dear
Please Help me for PCQ Mechanism , and please See my detailed question here Please :( viewtopic.php?f=2&t=28537

Re: Complete DELPHI API client: update 4

Posted: Tue Jul 04, 2017 3:43 pm
by bgkitlua
Please help-me, i'm creating a software with delphi api, but i can't download a file of RouterBoard. How i can do this?

Re: Complete DELPHI API client: update 4

Posted: Tue Jul 04, 2017 5:59 pm
by Chupaka
What file?..

Re: Complete DELPHI API client: update 4

Posted: Fri Dec 22, 2017 1:00 am
by coopersoft
Hello, I need to connect to mikrotik through Delphi 10.1 Berlin, and I'm not getting it, can anyone help me?
Units do not work.

Re: Complete DELPHI API client: update 4

Posted: Fri Dec 22, 2017 11:47 am
by Chupaka
Hello, I need to connect to mikrotik through Delphi 10.1 Berlin, and I'm not getting it, can anyone help me?
Units do not work.
what exactly is not working? some errors or something?..

Re: Complete DELPHI API client: update 4

Posted: Fri Dec 29, 2017 6:39 pm
by hendrojio
helo, mr. Chupaka
I'm a new in API delphi. I try to make my self program,
First I want to save my file from simple queue in folder of RB, I did it and it work in mikrotik terminal, the command are:
/queue simple print rate file=<name-file>
That's what I want, just save a file and not to show the result of queue simple rate.
So I run command from API Delphi, of course it work as in the memo.text show the result result queue simple rate (but I didn't want it because it of course make my procces program goes slowly), but that's never save a file in folder files of RB.
My command in delphi: 1) /queue/simple/print 2)=rate 3)=file=<myfile>

second problem is, how can I download that file from RB to my folder in Windows laptop?
I want do that with interval in 5s (save a file in RB folder then download to laptop , because I will put them in my database).
I hope you can solve my problem.
Thank you.

Re: Complete DELPHI API client: update 4

Posted: Wed Jan 03, 2018 9:27 am
by Chupaka
Don't do it that way. It's completely wrong.

Just receive data directly via API, instead of using the microscope for hammering nails.

Get /queue/simple/print data and use it directly in your program, without intermediate files.

Api studio + Delphi 10.1 Berlin

Posted: Tue Mar 13, 2018 1:44 am
by hermeson
Hello guys, I just donwload the studio api from the forum and try to compile but it says "decimalseparator" undeclared!!!!

Any atual version to run on Berlin?

Thanks

Re: Complete DELPHI API client: update 4

Posted: Tue Jul 31, 2018 4:37 am
by irawan
This error is not come from RouterOSAPI.
Look at this link https://stackoverflow.com/questions/315 ... rsion-of-s and some adjustment yourself.
I have no newer Delphi here, so can not help you more than this.

Re: Complete DELPHI API client: update 4

Posted: Mon Jul 08, 2019 11:36 pm
by jwilkinson6028
I can no longer login via API after updating to the latest 6.45.1
I would like to have this fixed as I want to use newer features of RouterOS and still use this API.

Re: Complete DELPHI API client: update 4

Posted: Tue Jul 30, 2019 2:02 pm
by Chupaka
rodolfo, any plans on fixing it? ☝️

Re: Complete DELPHI API client: update 4

Posted: Tue Jul 30, 2019 6:13 pm
by hermeson
Master @Chupaka what is the difference of API and Radius? any vantage to set my APP with Radius logic or API would it do? As I can see the app around, when people use Radius all request are not listed on log list, on the other hand everything I do with API shows on log... any suggestion for that? Thanks

Re: Complete DELPHI API client: update 4

Posted: Wed Oct 16, 2019 1:59 pm
by zsa
Hi all!
I fixed api_studio for new login after v6.43 RouterOS.
Added new checkbox post-v6.43 and new process case for it.
Hope usefull.

!!! FIX !!!
In .zip archive new compiled file /src/api_studio.exe not in root !!!

Re: Complete DELPHI API client: update 4

Posted: Sun Nov 03, 2019 7:51 pm
by hendrojio
hi all
I need to list all station connected in mikrotik wireless, I use RB 941nd, in terminal we do: /interface wireless registration-table print,
then I send API command : /interface/wireless/registration-table/print , it work & running well, but it can not show all registration station as terminal does, it just show few station, I think it was an error because sometimes it can show all, but often show a few.
Help me Mr. Chupaka, bro.zsa, mr.Rodolfo or anyone else..
Thank You

Re: Complete DELPHI API client: update 4

Posted: Tue Dec 01, 2020 4:26 am
by hendrojio
Hi.
I need to get data as I get in terminal by command: /interface/monitor-traffic wlan1
I need to get rx and tx bits per-second (like picture in my attachment), but I can not get it in RouterOS API Delphi Client:
rx-tx per seconf forum mikrotik.png
I am using Delphi-RouterOS-API-1.3, I am trying to use command
:/interface/print
=stats=
?name=wlan1

then add =.proplist=bla.. bla.. bla..
it show many stats but nothing of that I need is rx bits per-second, tx bits per-second.
maybe, there are many suggest how to get it from WLAN interface..
Thanks..

Re: Complete DELPHI API client: update 4

Posted: Tue Dec 01, 2020 10:57 am
by Chupaka
So, you're trying to get "/interface/monitor-traffic" output by executing "/interface/print" command? Really? :)

Here's the command you need:
/interface/monitor-traffic
=interface=wlan1
=.proplist=rx-bits-per-second,tx-bits-per-second
You run it with "Query & Listen" button in API Test Client. Or add something like "=duration=1" to get a single result.

P.S. Looks like the correct topic for your API Client is viewtopic.php?f=9&t=31555