You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Microsoft SharePoint 2013中使用GetChanges API监控文件文件夹变更?

Troubleshooting SharePoint GetChanges API Partial Response

Hey there, let's dive into your issue with the SharePoint GetChanges API. First, here's a clear breakdown of what you've shared about your setup and request:

Background

You've added folders and files to the Shared Documents library in SharePoint, and you're trying to pull change records using the GetChanges endpoint.

Your Full Request Details

Request URL

POST https://xxxx.sharepoint.com/_api/web/getchanges?$filter=(Time ge datetime'2018-04-03T09:24:17Z')

Request Body

{"query":{"__metadata":{"type":"SP.ChangeQuery"},"Add":true,"Web":true,"Site":true,"Update": true, "DeleteObject":true, "File":true, "Folder":true, "ContentType":true}}

Partial Response Received

You mentioned you only received an incomplete response starting with:

{ [ "odata.type...

Common Fixes & Troubleshooting Steps

Let's walk through the most likely reasons for this partial response and how to address them:

  • Handle pagination: SharePoint's GetChanges API returns results in pages by default. If there are multiple changes, you'll need to use the ChangeToken from the response's d.__next property to fetch subsequent pages of results.
  • Narrow your ChangeQuery: Your current query includes Web, Site, and ContentType flags, which might be pulling in unrelated system-level changes. Since you're targeting Shared Documents, try trimming the query to only include flags relevant to library content: File, Folder, Add, Update, DeleteObject, and List (to focus on library-specific changes).
  • Validate the time filter: While your ISO 8601 time format is correct, double-check that the timestamp aligns with your site's time zone settings—mismatches can lead to unexpected result sets.
  • Check permissions: Ensure your user or app has at least Read permissions on both the site and the Shared Documents library; insufficient permissions can cause truncated or incomplete responses.
  • Capture the full response: Use tools like Postman or Fiddler to capture the complete API response. Sometimes client-side truncation makes it look like the API sent incomplete data, when it's actually just the display cutting off.

Example Modified Query

If you want to focus strictly on document library changes, adjust your request body to this:

{"query":{"__metadata":{"type":"SP.ChangeQuery"},"Add":true,"Update": true, "DeleteObject":true, "File":true, "Folder":true, "List":true}}

内容的提问来源于stack exchange,提问作者Joe

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 08:11:41