Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
jennratten
Super User
Super User

Power BI REST API in Dataflow - Syntax for Expanding Refreshables

Hello - 

I am having trouble getting the query written properly to expand refreshables by group in a dataflow.  This is working in desktop but not in the dataflow.  What do I need to change?  Thanks in advance.

 

This works in desktop:

 

 

    varToken = "Bearer " & GetAccessToken(),
    Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/", 
        [
            RelativePath = "admin/capacities/refreshables?$expand=group",
            Headers=[Authorization=varToken , Accept="*/*"]
        ]
    )),
    value = Source[value],

 

 

 

I have tried numerous variations but have not had success.  Each time I get the same outcome, "Please specify how to connect", which of course I have tried.  I am connecting anonymously and there no gateway for this dataflow mashup.

 

 

  varBaseUrl = "https://api.powerbi.com/v1.0/myorg/admin",
  //  varBaseUrl = "https://api.powerbi.com/v1.0/myorg/admin/capacities/refreshables",
  Source = Json.Document(Web.Contents(varBaseUrl, [
    RelativePath = "capacities/refreshables?$expand=group"
    Headers=[Authorization="Bearer " & _AccessToken{0}[Value], Accept="*/*"]//,
    //Query=[expand="group"]
    ])),
  value = Source[value],

 

 

 

I also have another question on this query - it works in dataflows but does not return only workspaces.  I have tried using type and #"type" but both result in the same table (that includes workspaces and groups).

 

 

  varBaseUrl = "https://api.powerbi.com/v1.0/myorg/groups",
  Source = Json.Document(Web.Contents(varBaseUrl, [
    Headers=[Authorization="Bearer " & _AccessToken{0}[Value], Accept="*/*"],
    Query = [#"type" = "Workspace", top = "1000"]
    ])),
  value = Source[value],

 

 

 

1 REPLY 1
Anonymous
Not applicable

Hi  @jennratten ,

You can try the rest api linked below:

https://docs.microsoft.com/en-us/rest/api/power-bi/admin/get-refreshable-for-capacity

https://docs.microsoft.com/en-us/rest/api/power-bi/admin/get-refreshables

https://docs.microsoft.com/en-us/rest/api/power-bi/admin/get-refreshables-for-capacity

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.