Reputation: 11
I'm using a SharePoint webhook and Sharepoint REST Api to sync two document libraries. The webhook notifies me of changes in the source library, and I use SP.ChangeQuery to retrieve change logs. My goal is to replicate changes such as Add, Update, Rename, MoveAway, MoveInto, etc., in the target library.
However, I'm encountering an issue with the Move operation. When I move a file or item, the webhook notifies me of a Rename event rather than a MoveAway or MoveInto event. Additionally, the change log doesn’t provide detailed information, like the old file path, which I need to replicate the change accurately.
My Questions:
Here is what GetChanges endpoint return me:
[{
"odata.type": "SP.ChangeItem",
"odata.id": "https://sharepoint-url/sites/MyCustomSite/_api/SP.ChangeItembb194d80-e790-4a7e-a7a2-d0aad70de12e",
"odata.editLink": "SP.ChangeItembb194d80-e790-4a7e-a7a2-d0aad70de12e",
"ChangeToken": {
"StringValue": "1;3;069a9217-3a20-4242-8e7f-d024bdbf09e2;638646104605230000;219234"
},
"ChangeType": 4,
"SiteId": "c1086585-8a88-4d0c-81e4-1ed0e3f5aef4",
"Time": "2024-10-15T17:34:21Z",
"Editor": "",
"EditorEmailHint": null,
"ItemId": 43,
"ListId": "069a9217-3a20-4242-8e7f-d024bdbf09e2",
"ServerRelativeUrl": "",
"SharedByUser": null,
"SharedWithUsers": null,
"UniqueId": "086ea534-c726-43c1-bfbe-c2f3dbed0ce2",
"WebId": "2093f273-4f6b-4806-ba5f-a8fcdf036336"
},....
Any guidance or advice on how to approach this issue would be greatly appreciated!
Steps I've Taken:
Upvotes: 1
Views: 36