Forum Discussion
Aidan-aaa
Dec 04, 2024Copper Contributor
Get all versions' check-in comments through API
I'm trying to use the REST API through Power Query to get all history check-in comments of an item. I could see all the comments from the version history but output of the API shows the lastes...
Dec 13, 2024
Make use of M-code:
Had this on an old project code of mine, it should work:
let SiteUrl = "https://<your-sharepoint-site>", ListName = "<list-name>", ItemId = "<item-id>", Endpoint = SiteUrl & "/_api/web/lists/getbytitle('" & ListName & "')/items(" & ItemId & ")/versions", Source = OData.Feed(Endpoint), VersionsTable = Source[results], ExpandedVersions = Table.ExpandRecordColumn(VersionsTable, {"VersionLabel", "CheckInComment", "Created"}, {"Version", "Comment", "Timestamp"}) in ExpandedVersions