is there a rule to just choose port 0?
Sort of… you can make an initial (normal) print request for ALL interfaces. They’re all printed in order*, so after you get the name of the first one, you can supply it to any further operations. The effect will be as targeting by a number.
An upcoming update of the client has an abstraction for such functionality (i.e. you call a single function which does that very thing), but for now - that’s the way to duplicate it.
- It at least appears so currently… MikroTik support hasn’t confirmed or denied whether this can be relied upon, despite me explicitly asking the question. If you want to err on the side of caution, you best have a DB where you store not only the IPs and credentials, but also the interface names of all routers involved.