I'm trying to page through
getListItemChangesSinceToken to get an entire list and then any changes to it but I'm getting very inconsistent results.
This is what I do to get the initial list of changes:
getListItemChangesSinceToken(using the PNP JS library) with a rowlimit and no
- Get some results, the next
- repeat from 1 with the received
Paging ListItemCollectionPositionNextuntil there's no
ListItemCollectionPositionNextin the results
- Store the
ChangeTokenfrom the very first results for calling next time.
Doing it this way on a test collection with 42 folders and 10 files gives me 14 folders+0 files when I use row limit 3 but 17 folders when I use row limit 8, and 16 folders with low limit 5. The paging goes through several iterations but skips a whole bunch of data it seems.
Furthermore, the paged results have their timestamps changed from UTC ISO format to local time space-separated format.
Here are two examples of the same folder result (after XML to JSON conversion), from the initial result and when it's part of a paged result. Timestamps and user references seem to change.
"ows_Created": "2019-12-07T13:07:28Z", "ows_Author": "35;#Wout Mertens,#i:firstname.lastname@example.org,#email@example.com,#firstname.lastname@example.org,#Wout Mertens",
"ows_Created": "2019-12-07 05:07:28", "ows_Author": "35;#Wout Mertens",
Is this API just broken? Am I using it wrongly?