Protiviti / SharePoint Blog

SharePoint Blog

March 25
A Small Example of REST

Coming from a LAMP world, one of the biggest things I miss is dumping database reads and writes directly onto a requested page.  It is one thing I wish SharePoint could do without busting out Visual Studio and crafting a web part.  Here in Managed Services, we frequently get requests that would be solved quickly and effectively by having that ability.

Enter the REST API.

More intensive list queries such as ‘How many hours have people dedicated to something’ or ‘What is the total amount of data each user has uploaded for this particular library’ are no problem for REST.  While these can be done using SUM columns or other out of the box techniques, they always show way more than what you want and are sometimes cumbersome or slow to setup.  If I want a single line of text that says “Volunteers have dedicated X hours to this cause”, than REST is the way to go.

The REST API in SharePoint bridges the gap between page layouts (or individual pages) and list/library access.  The best way I can describe it is it opens up the ability for lists and libraries to be treated as database tables (which really is essentially what they are).

My favorite part is it can all done in JavaScript, so it’s entirely Office 365 compatible without having to get crazy with apps.

If you’d like to know more about REST, here’s a solid MSDN overview of some REST basic operations.

There’s also a webinar from the great Kyle Schaeffer done for our 30 on Thursday series.  You can see that here-

Here’s to hoping everyone gets some REST … har har har ;).

Quick Launch

© Protiviti 2020. All rights reserved.   |   Privacy Policy