Accounts Payable data (AP) in AX 2012 R2/R3

We need to pull Accounts Payable (open transactions only)  - what is the best way to do this? ideally if this can be a batch job, it will be great as well.  

Also, I wonder what would be the best way to do this in Dynamics 365 Operations? Thank you