Jeff Pries shows us how we can monitor Power BI Enterprise Gateways:
To tie all of these steps together, I put together a brief C# console application which is capable of using stored credentials or prompting for credentials interactively, then performs the 4 steps listed above. Finally, the application receives the JSON response and de-serializes it and outputs it in a friendly way to the screen (or optionally inserts it into a SQL database table.
For the basics on how I perform the authentication and API query in the application, see my blog post here.
There are a few more steps than I would have anticipated.