SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services &...

19

Transcript of SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services &...

Page 1: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list
Page 2: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

SPS Boston 2015 is made possible

by our Sponsors

Page 5: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

Sources: http://en.wikipedia.org/wiki/SOAP#History, http://en.wikipedia.org/wiki/Representational_state_transfer

Page 6: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

Deprecated

Deprecated

Endpoint

/_vti_bin/listdata.svc

/_api

DeprecatedTBD, but unified

None

SOAP REST

Page 7: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

Source: https://spservices.codeplex.com/wikipage?title=$().SPServices

SOAP

Page 8: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list
Page 9: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

SOAP

Page 10: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

SOAP

REST

Page 11: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

SOAP

REST

Page 12: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

SOAP Option

(SPServices synonym)REST Comments

ViewFields

(CAMLViewFields)

$select Choose the columns you would like to retrieve. With both SOAP and REST we get

some data we don’t explicitly request, but by specifying only the columns we need

we can reduce the payload sizes.

Query

(CAMLQuery)

$filter,

$orderby

Specify which items in the list we would like to return and how we would like them

sorted.

RowLimit

(CAMLRowLimit)

$limit Say how many items matching the Query we would like to receive. In SOAP we can

specify 0 to get all matching items; in REST we can omit the parameter to get all the

matching items. Otherwise, we can specify any integer as the limit.

ViewName

(CAMLViewName)

NA ViewName lets you choose the view you would like to get in the response. There’s

no REST equivalent here. I’ve always discouraged using this option in SOAP because

it’s too easy to change the view settings and cause unintended consequences.

QueryOptions

(CAMLQueryOptions)

NA In SOAP, this lets us specify some options that change how the data is returned to

us. For example, we can ask for all of the attachment URLs rather than just a

Boolean which tells us that there are attachments.

NA $expand This option in REST has no direct equivalent in SOAP. $expand allows us to indicate

that we would like the values for a relationship - rather than just the indices - using

a projection. This is important with Lookup columns and Person or Group columns.

Page 13: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list
Page 14: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

JSON

SPGetListItem

sJson

XML

GetListItem

s

Page 15: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

JSON

REST

Page 16: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

We’ll look at live examples showing the different ways we can request data, along with conversion approaches.

Page 17: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

SharePoint 2013 – CRUD on List Items Using REST Services & jQuery

Get started with the SharePoint 2013 REST service

Working with lists and list items with REST

Use OData query operations in SharePoint REST requests

OData.org

Page 18: SPS Boston 2015 is made possible...SharePoint 2013 –CRUD on List Items Using REST Services & jQuery Get started with the SharePoint 2013 REST service Working with lists and list

October 24/25 2015

May 7/8 2016