migueesc123 / PowerBIRESTAPI

A Microsoft Power BI Data Connector or Power Query Connector for the Power BI REST API
MIT License
237 stars 74 forks source link

Adding of artifacts to connector #147

Open Stoejfan opened 1 year ago

Stoejfan commented 1 year ago

First of all, this is probably the best idea out there for Power BI administration and one of the projects that both has and will save many of us a lot of time by setting up a reference framework for all calls to the API. I would love to see this as an officially certified connector in the future and would love to help with this if I can.

However, a nice addition to the current state of the connector would be the addition of artifacts across the tenant, more specifically the:

That would add to the overall admin-usage of this connector.

I will try to be working on this myself, but being quite a noobie on the PQ-part, I know that this is not something around the corner.

toneshelby commented 1 year ago

I second this please! I am badly needing the Admin - Groups GetUnusedArtifactsAsAdmin for all workspaces on a large tenant for a massive cleanup project.

Also a function to Invoke-PowerBIRestMethod to pass in a url to produce back results would be a nice feature for pulling back any ad-hoc requests to the model or output file to a downloads folder - not sure if this is possible but would be very useful when admin is requested to produce for governance and compliance reporting on the fly.

klinejordan commented 1 year ago

These will be great additions but would present some challenges especially for beginners to calling APIs with M. All of these have a continuationToken pagination method which can be tricky in M.

Also, in large tenants, the GetUnusedArtifactsAsAdmin would almost certainly fail given that there's a 200 requests per hour limitation on them on you have to loop through each workspace one at a time. Similar API calls that have this kind of throttling are put into the "Experimental" folder as we cannot guarantee performance in large tenants.

klinejordan commented 1 year ago

@toneshelby can you expand on this request, perhaps in another Issue so we can track separately:

"Also a function to Invoke-PowerBIRestMethod to pass in a url to produce back results would be a nice feature for pulling back any ad-hoc requests to the model or output file to a downloads folder - not sure if this is possible but would be very useful when admin is requested to produce for governance and compliance reporting on the fly."

This connector already has a function (GETData) where you can put in any URL you want and it returns the raw JSON. But I'm not sure what you mean by "output file to a downloads folder", this is not a PowerShell script this is just a connector for Power BI and it can't programmatically dump files anywhere.