0

I have 2 different programs that are built on the Microsoft client DLLs:

  1. Version 2010 - Uses the Microsoft.SharePoint.Client.dll

  2. Version 2013 - Uses the Microsoft CSOM 2013 dll.

I am given a web URL that could be either 2010 or 2013 sharepoint URL but I don't know which.

How can I make a simple REST api call to determine SharePoint version?

1

By simply calling the SharePoint root site or any other SharePoint site for that reason you get the versionnumber in the responseheader. ("MicrosoftSharePointTeamServices") This is no a reliable way of finding out the real buildversion but enough to determine which version of SharePoint.

SharePoint 2010 = 14.x, SharePoint 2013 = 15.x and SharePoint 2016 = 16.x

enter image description here

| improve this answer | |
0

You can try Contextinfo API call to get the version of SharePoint. Kindly revert back if you need any further information.

Update I have used the SP Rest Client Chrome extension to get Contextinfo using POST method, but for some wired reasons same is not working with POSTMAN

Ref POSTMan failing to get Contextinfo

All the best.

| improve this answer | |
  • Tried it. blank response POST {SPURL}/_api/contextinfo Header: Accept application/json;odata=verbose returns empty string – Nicholas DiPiazza Apr 26 '18 at 13:19
  • I tried it with SharePoint REST Client (Powered by SharePoint Plex) which returns the library version – Shridhar J Joshi Apr 26 '18 at 13:31
  • Yes it works on SP 2013. but if you read my question, i need this to work on sharepoint 2010 too. – Nicholas DiPiazza Apr 26 '18 at 13:34

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.