For real time purpose, you can check Real-time streaming in Power BI.
As to how to feed the dataset with your data from your api, you'll have to build the bridge, maybe by using a C# console app calling the post API every 10 seconds and keep pushing data to Power BI.