none
PowerBi and SPO RestAPI RRS feed

  • Question

  • Hello, 

    I'm new to the this, so please excuse my generic question. 

    I need to access SPO data, such as site collections, page views, storage quota etc etc. 

    I was wondering if this was possible via the SPO API?

    I have the below query to show the site collections : https://companyURL.sharepoint.com/_api/search/query?querytext='contentclass:STS_Site'

    When i insert the above URL into the browser, it returns a whole load of XML. 

    How do i :

    a) get more data to show, such as page view, storage quota etc

    b) Get PowerBi to load that data. When i use the web data connection, it does not show the same data as you see in the browser. 

    C) i copied the data from the browser and saved it as an XML file, and tried to import the XML into PowerBi, but i get the same problem as above, it doesn't show the correct data. 

    Any help would be great, Thanks

    Monday, October 14, 2019 1:23 PM

Answers

All replies

  • Hey!

    Your best bet would be to create a Power BI Custom Connector:

    https://github.com/microsoft/DataConnectors

    and following the available documentation for the API in question like this one:

    https://docs.microsoft.com/en-us/sharepoint/dev/general-development/sharepoint-search-rest-api-overview

    Monday, October 14, 2019 2:45 PM
  • Hi. 

    Thanks for your response. 

    May i ask why i would need to create a custom connector?. When i run the https://companyURL.sharepoint.com/_api/search/query?querytext='contentclass:STS_Site' it actually returns results (even though a lot of the results are meaningless) 

    What would a custom connector do that an OOTB connector in PowerBi cant do?

    PowerBi has a XML connector?

    Tuesday, October 15, 2019 2:57 PM
  • Hi. 

    Thanks for your response. 

    May i ask why i would need to create a custom connector?. When i run the https://companyURL.sharepoint.com/_api/search/query?querytext='contentclass:STS_Site' it actually returns results (even though a lot of the results are meaningless) 

    What would a custom connector do that an OOTB connector in PowerBi cant do?

    PowerBi has a XML connector?

    Mainly paging. There's a few other components, but paging is the core one.
    • Marked as answer by VStar19 Friday, November 8, 2019 10:21 AM
    Tuesday, October 15, 2019 4:24 PM