Hey @djanszentql ,
if it's just about the measure you don't need the REST API.
You can just create measures in Power BI Service or if you connect your Power BI Desktop to the Live data set. This measure you can of course use in Dashboards. I did it many times.
From my understanding the article you quoted mainly to create a data model with the API in a live data set. But I'm not aware that you can do that. Will investigate that further 😉
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍