Question

I would like to get the list of folders and list items one level at a time, instead of querying all items under a SharePoint list. I plowed through SharePoint documentations and Stackoverflow and such to make sure I am using the <folder> options proper, but still the GetListItemChangesSinceToken still returns everything under the SharePoint list.

The site structure is:

The call:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.microsoft.com/sharepoint/soap/"><soap:Body>
<GetListItemChangesSinceToken>
<listName>doclib</listName>
<queryOptions><QueryOptions>
<Folder>/mysite/doclib</Folder>
</QueryOptions></queryOptions>
</GetListItemChangesSinceToken></soap:Body></soap:Envelope>

Our servers are of 2010 and 2013.

Question:

  • is there anything wrong with my call? I pared down the call to minimum, and also I tried various input e.g. trimming the '/' front and back, using a subfolder instead, etc. etc. but no different

  • or, is it actually supposed to be working?

Was it helpful?

Solution

GetListItemChangesSinceToken requires changeToken that you're not passing, if you do not pass it, you will get all items.

"By including this token when you call GetListItemChangesSinceToken, the server looks for only those changes that have occurred since the token was generated. Sending a GetListItemChangesSinceToken request without including a token returns the list schema, the full list contents and a token."

Source

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top