Logs aren’t available through an API call directly for Machines (through the Machines API).
I believe I saw that someone was working on some more log functionality/integrations but at this second, you can use an instance of the Fly Log Shipper to ship logs somewhere that will allow you to filter them (or you can filter by an app or even machine via log shipper config).
Yeah, i’m already familiar with log shippers, and that should be more than enough for now.
Wonder if you’re considering “Log Drains” feature in the future? This is a very convenient feature on Heroku platform and allows to quickly add a HTTP sink for logs without having to deploy a separate app.