Skip to content

Instantly share code, notes, and snippets.

@ethan-deng
Last active September 26, 2016 18:58
Show Gist options
  • Save ethan-deng/9d6069d6b4d1a1cef4c093f2a551ae75 to your computer and use it in GitHub Desktop.
Save ethan-deng/9d6069d6b4d1a1cef4c093f2a551ae75 to your computer and use it in GitHub Desktop.

SharePoint Rest API

REST URL Length Limit

Pagination

Things need to know about REST API

  • First all Microsoft's REST API documentation is full of errors. So be careful!
  • Only use "GET" and "POST" in ajax calls.
  • "PUT", "MERGE" and "DELETE" are used in the HTTP header "X-HTTP-Method"
  • I don't see many use of "PUT" which replaces the existing item. Most likely you will use "MERGE" which really means to update the item.
  • lists/getbytitle('listname')/items only return 100 items. Use $top=1000 to get 1000 items.
  • REST URL's length limitation is about 2000 but not 256 as claimed in https://msdn.microsoft.com/en-us/library/office/dn292556.aspx

Lookup and User Field

Upload files

Show User Profile Pictures

Create List Fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment