The “where” argument is not available from the API protocol. You must use queries instead. The easiest way is as the second argument of the request constructor, e.g.
new RouterOS\Request('/interface/print stats=""', RouterOS\Query::where('name', 'ether1-gateway'))
(assuming you wanted data for an interface named “ether1-gateway”; adjust accordingly for “ether0”)
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.
some places do accept item name as .id value, like interface names. That has been written here in the forums several times by me. As that is not the case for all possible menus numeric (*) identifier use is encouraged as that will be homogenous through out the API.