Run API call on remote Routerboard via another Routerboard

I have a Routerboard that works as VPN server (ovpn/sstp) so several other Routerboards can connect to and over this links we send application traffic. Nothing too serious and works fine. Several of these “client” mikrotiks are behind NAT so use of these vpn tunnels is the only way to reach routers.

I need to gather some generic stats from client routers. I’d like to do some API call or script run on “central” mikrotik to connect further to client one and do the necessary inspection.

So the question is: if there any way to connect to remote (“client”) mikrotik by running some API call to “central” mikrotik (the VPN call-in server)?

An API call to switch to another router’s API - no.

However, you can set up your VPN server so that the device the API application is on is a special VPN client that can connect to any other device in the VPN network. That is, instead of connecting to the central router via API, you connect directly to the VPN client routers over the API, using their VPN IPs. The central router will forward that traffic (just like it would forward any other traffic between it and the client), and thus let you make a connection that way.

I really hoped I will find a way to do that so sad it isn’t so. Will do the way you advised (actually I was about to do that anyway).