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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
IbisRipley
Frequent Visitor

How to call SOAP(not REST) sharepoint Lists Service method GetVersionCollection

I have spent quite a few days reading posts on this and I still can't figure it out:

Requirement

  • I need to get all prior versions of a given list item into power bi to report on them. ( I already have all other data)

Background

  • It seems sharepoint has 2 web APIs for listdata, REST and SOAP(older) 
  • the SOAP SP service has a method called GetVersionCollection that takes a listID and itemID that returns the exact data I need
  • In my current model, I have a table that has all of these parameters (listIDs, ItemIDs)
  • As far as I know, the way to do it via REST is to use this page: Web.Page(Web.Contents(https://foo.com/sites/site/_layouts/versions.aspx?list=","xxxxx-xx-xx-xx-xxxxxxx", "&ID=17"}) ) and also web.Contents But the problem with this approach is that the page is a report and has all the data rows split (2 field in 1 row, 2 fields in the next. Like this (below are row id 6 and 5 - the row below has the value)

image.png

 

So, My Question is:  How can I EITHER

Call the SOAP version GetVersionCollection in PBI (not PBI, but something like:

 

$().SPServices({  operation: "GetVersionCollection",
  async: false,  strlistID: "Projects",  strlistItemID: 1,  strFieldName: "Description",  completefunc: function (xData, Status) {    $(xData.responseText).find("Version").each(function(i) {      console.log("Name: " + $(this).attr("Description") + " Modified: " + $(this).attr("Modified"));
    });  
  }
}); 

https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/bb263650(v%3Doff...

 

OR

Get the REST resultSet split/parsed so it's in one table.

 

Like I said, I have been doing trial and error for quite a while.  Any tips would help.

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @IbisRipley ,

 

Hope this document can help you.

https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/bb263650(v%3Doff...

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.