Doubt: Command in Java

Hi, I’m trying to execute this command from my program using the Java api:

“/interface/ethernet/print stats-detail”

But it says it doesn’t exist. When I execute it in a terminal window using Winbox it does work using:

“/interface ethernet print stats-detail”

What am I doing wrong? :frowning:

Thanks.

Each argument needs to be written as a separate API word. In the case of the Java API client, this is done with a newline, e.g.

"/interface/ethernet/print\n=stats=\n=detail="