1

I'm trying to query SPSite for changes but I can't seem to figure out the difference between that and querying SPWeb.

I'm following this documentation

https://msdn.microsoft.com/en-us/library/office/dn499819.aspx#bk_WebGetChanges

Am I querying SPSite or SPWeb, I am confused.

If my site collection is

https://abccompany.sharepoint.com/teams/f1

and I am using the following endpoint

https://abccompany.sharepoint.com/teams/f1/_api/web/getchanges

am I querying SPSite?

1

If you want to query particular object with REST API, you need to use appropriate object in url.

For example consider following REST queries:

  • Get changes for site collection:
https://sp.sharepoint.com/sites/dev/_api/site/getchanges(@qry)?@qry=%7b%22Update%22%3atrue%7d    
  • Get changes for web:
https://sp.sharepoint.com/sites/dev/_api/web/getchanges(@qry)?@qry=%7b%22Update%22%3atrue%7d  
  • Get changes for a list:
https://sp.sharepoint.com/sites/dev/_api/Lists/getbytitle('MyList')/getchanges(@qry)?@qry=%7b%22Update%22%3atrue%7d  

In your case query https://sp.sharepoint.com/teams/f1/_api/web/getchanges will get changes for SPWeb object.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.