API communication with the serial port

Hello,

I am writing an app and I need to read the mikrotik´s serial port.
Could anybody tell me the correct command?
Using ssh the command is:

/system serial-terminal serial0

I try with:

/system/serial-terminal/serial0

Unfortunately the response is the next one:

=message=no such command

Thank you in advance,

Igorlor

it is interactive command, these do not work through API. You could create special login that would allow attach session to serial port and use that over IP network.