Thanks for your reply, and yes that is what I want to be able to do, to create a pbix programmatically.
At the momment I create a view programattically and use this as a data source for reports. However, each view created for a customer (and there could be 100's) needs a few measures created as well as getting the data into the report.
It would be excellent if the pbix could be created programmatically including the measures, so the user does not need to be concerned with using DAX.
That's my aim. Seems like other products can do this, so Power BI should open up an API also. I've added my votes.