SlideShare une entreprise Scribd logo
1  sur  28
Are You Getting
Sleepy?
REST with SharePoint
Apps
Liam Cleary
About Me
• Solution Architect @ Protiviti
• 7 Time SharePoint MVP
• Cover Everything-SharePoint
• Development
• Branding
• Design
• Architecture
• Security
• Dream about SharePoint, well sometimes
Session Type
Agenda
REST
SharePoin
t 2013
SharePoin
t Apps
Thoughts
REST
What is REST, well SharePoint REST?
REST
• Representational State
Transfer
• Vocabulary Based
• GET
• POST
• PUT
• PATCH
• DELETE
SharePoint REST
• HTTP-Based Architecture
• Uses Nouns and Verbs
• Items, GET, POST, PUT, DELETE
• OData Provides the
Description/Metadata
• “/items(1)”
• CSOM is the Processor
• Returns JSON or XML
• “/items/GetByTitle(„Test‟)”
The REST Flow
Create
POST
Read
GET
Update/Delet
e
PUT
MERGE
DELETE
REST Syntax
http://site/_api/web/lists/getbytitle('Shared Documents')/items/getbyid(1)?$select=Title,ID
Location Service Resource Path Query Options
REST Filtering
Option Description
$expand
Directs that related records should be
retrieved in the record or collection being
retrieved.
$filter
Specifies an expression or function that must
evaluate to „true‟ for a record to be returned in
the collection.
$orderby
Determines what values are used to order a
collection of records.
$select Specifies a sub set of properties to return.
$skip
Sets the number of records to skip before it
retrieves records in a collection.
$top
Determines the maximum number of records
to return.
SharePoint 2013
SharePoint 2013 REST Endpoints
Site
Webs
Features
Event
Receivers
Web
Lists
Items
Publishin
g
Pages
Variations
Navigation
User
Profiles
Users
Profiles
Activity
Search
Query
Results
Suggestio
ns
Taxonom
y
Managed
Metadata
SharePoint 2013 REST Security
Local
Current
Context
Request Digest
Context Info
Remote
OAuth
Access Token
Cross Domain
Cross Domain
Request
Executor
SP.WebProxy
HTTP
WebRequest
Endpoints – Example READ
URL Returns
_api/web/title “Title” of the current site
_api/web/lists(guid'<list id>') Get the list from supplied ID
_api/web/lists/getByTitle('Announcements')
/fields
Get all columns from the “Announcements”
list
_api/web/lists/getByTitle('Task')/items Get items from the “Task” list
_api/web/siteusers Get users in the site
_api/web/sitegroups Get user groups in the site
_api/web/sitegroups(3)/users Get users that belong to group “3”
_api/web/GetFolderByServerRelativeUrl('/S
hared Documents')
Get root folder of the Shared Documents
library
_api/web/GetFolderByServerRelativeUrl('/T
est')/Files('a.txt')/$value
Get “a.txt” from the “Test” document library
SharePoint Apps
SharePoint App Types
Provider Hosted
App Web -
Optional
Dedicated Hosting
REST + OAuth
CSOM
Auto hosted
App Web –
Optional
Windows/SQL
Azure
REST + Oauth
CSOM
SharePoint Hosted
App Web
REST
JSOM
SharePoint 2013 App User Experience
Immersive
Full Page
Redirect to App
Web
Chrome will be
needed
Part
Web/App Part
Page(s) Loaded
from App Web
Fit into existing
structure and
chrome
Custom
Actions
Ribbon
ECB
Redirect to App
Web
Part of the
native UI
Code
SharePoint 2013 REST - jQuery
jQuery.ajax({
url: “http://site url/_api/web/lists”,
type: “GET”,
headers: {
“ACCEPT”: “application/json;odata=verbose”,
“Authorization”: “Bearer “ + accessToken
},
})
SharePoint 2013 REST – Cross Domain Library
var executor;
executor = new SP.RequestExecutor(appweburl);
executor.executeAsync(
{
url: appweburl + "/_api/SP.AppContextSite(@target)/web/Folders?@target='" +
hostweburl + "'",
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
success: getSuccessHandler,
error: getErrorHandler
}
SharePoint 2013 REST – C#
HttpWebRequest endpointRequest = (HttpWebRequest)HttpWebRequest.Create("http:// <site
url>/_api/web/lists");
endpointRequest.Method = "GET";
endpointRequest.Accept = "application/json;odata=verbose";
endpointRequest.Headers.Add("Authorization", "Bearer " + accessToken);
HttpWebResponse endpointResponse = (HttpWebResponse)endpointRequest.GetResponse();
Show Me The Money
Thoughts
Thoughts
Feature
.NET Framework / Silverlight
object models
JavaScript object model REST / OData Endpoints
Object-oriented programming Yes Yes No
Batch processing Yes Yes No
APIs for conditional processing
and exception handling
Yes No No
Availability of LINQ syntax Yes No No
Combining list data from different
SharePoint web applications
Yes No Yes
Familiarity to experienced
REST/OData developers
No No Yes
Similarity to non-Windows
programming or JavaScript
programming
No Yes Yes
Strong typing for list item fields No (except with LINQ) No
Yes, from Windows platform
No, from JavaScript
Leveraging jQuery, Knockout, and
other JavaScript libraries
No Yes
No, from Windows platform
Yes, from JavaScript
Thoughts
• Data is returned as XML in AtomPub
• Extended by the OData Format – “accept: application/json;odata=verbose”
• OData and SharePoint REST are not the same
• Choose the right data retrieval
• Set the correct permissions for your SharePoint App
Resources
• http://www.mavention.nl/blog/configuring-sharepoint-2013-search-
rest-api-anonymous-users
• http://msdn.microsoft.com/en-us/library/jj164022.aspx
• http://msdn.microsoft.com/en-us/magazine/dn198245.aspx
• http://msdn.microsoft.com/en-us/library/dn292553.aspx
• http://msdn.microsoft.com/en-us/library/dn292552.aspx
• http://msdn.microsoft.com/en-us/library/fp142380.aspx
Resources
• Please remember to turn in your filled out bingo cards and event
evaluations for prizes.
• SharePint is sponsored by Slalom at Whiskey Trader (Between 55th
and 56th on 6th Avenue).
• Follow SharePoint Saturday New York City on Twitter @spsnyc and
hashtag #spsnyc
Thank You to the Sponsors
Thank You

Contenu connexe

Tendances

SharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewSharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewRob Windsor
 
SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)Kashif Imran
 
Advanced SharePoint Web Part Development
Advanced SharePoint Web Part DevelopmentAdvanced SharePoint Web Part Development
Advanced SharePoint Web Part DevelopmentRob Windsor
 
SharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object ModelSharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object ModelPhil Wicklund
 
Introduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIIntroduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIRob Windsor
 
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...SharePoint Saturday NY
 
Integrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchIntegrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchRob Windsor
 
SharePoint 2010 Client Object Model
SharePoint 2010 Client Object ModelSharePoint 2010 Client Object Model
SharePoint 2010 Client Object ModelG. Scott Singleton
 
Hooking SharePoint APIs with Android
Hooking SharePoint APIs with AndroidHooking SharePoint APIs with Android
Hooking SharePoint APIs with AndroidKris Wagner
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기lanslote
 
Get Some Rest - Taking Advantage of the SharePoint 2013 REST API
Get Some Rest - Taking Advantage of the SharePoint 2013 REST APIGet Some Rest - Taking Advantage of the SharePoint 2013 REST API
Get Some Rest - Taking Advantage of the SharePoint 2013 REST APIEric Shupps
 
Android SharePoint
Android SharePointAndroid SharePoint
Android SharePointBenCox35
 
CSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
CSOM (Client Side Object Model). Explained @ SharePoint Saturday HoustonCSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
CSOM (Client Side Object Model). Explained @ SharePoint Saturday HoustonKunaal Kapoor
 
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...SPTechCon
 
Power Automate Techniques that "Saved Our Bacon"
Power Automate Techniques that "Saved Our Bacon"Power Automate Techniques that "Saved Our Bacon"
Power Automate Techniques that "Saved Our Bacon"Thomas Duff
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointRene Modery
 
Client Object Model and REST Improvements in SharePoint 2013
Client Object Model and REST Improvements in SharePoint 2013Client Object Model and REST Improvements in SharePoint 2013
Client Object Model and REST Improvements in SharePoint 2013Ejada
 
Exam 70-488 Developing Microsoft SharePoint Server 2013 Core Solutions Learni...
Exam 70-488 Developing Microsoft SharePoint Server 2013 Core Solutions Learni...Exam 70-488 Developing Microsoft SharePoint Server 2013 Core Solutions Learni...
Exam 70-488 Developing Microsoft SharePoint Server 2013 Core Solutions Learni...Mahmoud Hamed Mahmoud
 
SharePoint 2010 Enterprise Search
SharePoint 2010 Enterprise SearchSharePoint 2010 Enterprise Search
SharePoint 2010 Enterprise SearchAgnes Molnar
 

Tendances (20)

SharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewSharePoint 2010 Application Development Overview
SharePoint 2010 Application Development Overview
 
SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)
 
Advanced SharePoint Web Part Development
Advanced SharePoint Web Part DevelopmentAdvanced SharePoint Web Part Development
Advanced SharePoint Web Part Development
 
SharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object ModelSharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object Model
 
Introduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIIntroduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST API
 
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
 
Integrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchIntegrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio Lightswitch
 
SharePoint 2010 Client Object Model
SharePoint 2010 Client Object ModelSharePoint 2010 Client Object Model
SharePoint 2010 Client Object Model
 
Hooking SharePoint APIs with Android
Hooking SharePoint APIs with AndroidHooking SharePoint APIs with Android
Hooking SharePoint APIs with Android
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
 
Get Some Rest - Taking Advantage of the SharePoint 2013 REST API
Get Some Rest - Taking Advantage of the SharePoint 2013 REST APIGet Some Rest - Taking Advantage of the SharePoint 2013 REST API
Get Some Rest - Taking Advantage of the SharePoint 2013 REST API
 
Android SharePoint
Android SharePointAndroid SharePoint
Android SharePoint
 
CSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
CSOM (Client Side Object Model). Explained @ SharePoint Saturday HoustonCSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
CSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
 
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
 
Power Automate Techniques that "Saved Our Bacon"
Power Automate Techniques that "Saved Our Bacon"Power Automate Techniques that "Saved Our Bacon"
Power Automate Techniques that "Saved Our Bacon"
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePoint
 
Sharepoint Online
Sharepoint OnlineSharepoint Online
Sharepoint Online
 
Client Object Model and REST Improvements in SharePoint 2013
Client Object Model and REST Improvements in SharePoint 2013Client Object Model and REST Improvements in SharePoint 2013
Client Object Model and REST Improvements in SharePoint 2013
 
Exam 70-488 Developing Microsoft SharePoint Server 2013 Core Solutions Learni...
Exam 70-488 Developing Microsoft SharePoint Server 2013 Core Solutions Learni...Exam 70-488 Developing Microsoft SharePoint Server 2013 Core Solutions Learni...
Exam 70-488 Developing Microsoft SharePoint Server 2013 Core Solutions Learni...
 
SharePoint 2010 Enterprise Search
SharePoint 2010 Enterprise SearchSharePoint 2010 Enterprise Search
SharePoint 2010 Enterprise Search
 

Similaire à Are you getting Sleepy. REST in SharePoint Apps

jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013Kiril Iliev
 
Share point hosted add ins munich
Share point hosted add ins munichShare point hosted add ins munich
Share point hosted add ins munichSonja Madsen
 
Rest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsRest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsCarol McDonald
 
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST APISPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST APIEric Shupps
 
Getting started with DSpace 7 REST API
Getting started with DSpace 7 REST APIGetting started with DSpace 7 REST API
Getting started with DSpace 7 REST API4Science
 
Simple REST with Dropwizard
Simple REST with DropwizardSimple REST with Dropwizard
Simple REST with DropwizardAndrei Savu
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiTiago Knoch
 
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...BlueMetalInc
 
SPFx Webinar Loading SharePoint data in a SPFx Webpart
SPFx Webinar Loading SharePoint data in a SPFx WebpartSPFx Webinar Loading SharePoint data in a SPFx Webpart
SPFx Webinar Loading SharePoint data in a SPFx WebpartJenkins NS
 
Share point development 101
Share point development 101Share point development 101
Share point development 101Becky Bertram
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
SharePoint 2013 REST APIs
SharePoint 2013 REST APIsSharePoint 2013 REST APIs
SharePoint 2013 REST APIsGiuseppe Marchi
 
SharePoint and Office Development Workshop
SharePoint and Office Development WorkshopSharePoint and Office Development Workshop
SharePoint and Office Development WorkshopEric Shupps
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座Li Yi
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Mario Cardinal
 
Building RESTful applications using Spring MVC
Building RESTful applications using Spring MVCBuilding RESTful applications using Spring MVC
Building RESTful applications using Spring MVCIndicThreads
 

Similaire à Are you getting Sleepy. REST in SharePoint Apps (20)

jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
 
Share point hosted add ins munich
Share point hosted add ins munichShare point hosted add ins munich
Share point hosted add ins munich
 
Rest
RestRest
Rest
 
Rest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsRest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.js
 
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST APISPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
 
Getting started with DSpace 7 REST API
Getting started with DSpace 7 REST APIGetting started with DSpace 7 REST API
Getting started with DSpace 7 REST API
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
Simple REST with Dropwizard
Simple REST with DropwizardSimple REST with Dropwizard
Simple REST with Dropwizard
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
 
SPFx Webinar Loading SharePoint data in a SPFx Webpart
SPFx Webinar Loading SharePoint data in a SPFx WebpartSPFx Webinar Loading SharePoint data in a SPFx Webpart
SPFx Webinar Loading SharePoint data in a SPFx Webpart
 
Share point development 101
Share point development 101Share point development 101
Share point development 101
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Web api
Web apiWeb api
Web api
 
SharePoint 2013 REST APIs
SharePoint 2013 REST APIsSharePoint 2013 REST APIs
SharePoint 2013 REST APIs
 
SharePoint and Office Development Workshop
SharePoint and Office Development WorkshopSharePoint and Office Development Workshop
SharePoint and Office Development Workshop
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.
 
Android and REST
Android and RESTAndroid and REST
Android and REST
 
Building RESTful applications using Spring MVC
Building RESTful applications using Spring MVCBuilding RESTful applications using Spring MVC
Building RESTful applications using Spring MVC
 

Plus de Liam Cleary [MVP]

SharePoint Fest Denver - Documents and Records Management in SharePoint
SharePoint Fest Denver - Documents and Records Management in SharePointSharePoint Fest Denver - Documents and Records Management in SharePoint
SharePoint Fest Denver - Documents and Records Management in SharePointLiam Cleary [MVP]
 
The SUG - Documents & Records Management, Really
The SUG - Documents & Records Management, ReallyThe SUG - Documents & Records Management, Really
The SUG - Documents & Records Management, ReallyLiam Cleary [MVP]
 
Stop Those Prying Eyes Getting To Your Data SPTechCon
Stop Those Prying Eyes Getting To Your Data SPTechConStop Those Prying Eyes Getting To Your Data SPTechCon
Stop Those Prying Eyes Getting To Your Data SPTechConLiam Cleary [MVP]
 
SharePoint Authentication And Authorization SPTechCon San Francisco
SharePoint Authentication And Authorization SPTechCon San FranciscoSharePoint Authentication And Authorization SPTechCon San Francisco
SharePoint Authentication And Authorization SPTechCon San FranciscoLiam Cleary [MVP]
 
SharePoint Saturday Austin - Share point authentication and authorization
SharePoint Saturday Austin - Share point authentication and authorizationSharePoint Saturday Austin - Share point authentication and authorization
SharePoint Saturday Austin - Share point authentication and authorizationLiam Cleary [MVP]
 
SharePoint Saturday Utah - Do you claim to be from the Azure Sky?
SharePoint Saturday Utah - Do you claim to be from the Azure Sky?SharePoint Saturday Utah - Do you claim to be from the Azure Sky?
SharePoint Saturday Utah - Do you claim to be from the Azure Sky?Liam Cleary [MVP]
 
SharePoint Saturday Utah - The Art of the Possible Keynote
SharePoint Saturday Utah - The Art of the Possible KeynoteSharePoint Saturday Utah - The Art of the Possible Keynote
SharePoint Saturday Utah - The Art of the Possible KeynoteLiam Cleary [MVP]
 
SharePoint Saturday Richmond - Documents and Records in SharePoint, Really
SharePoint Saturday Richmond - Documents and Records in SharePoint, ReallySharePoint Saturday Richmond - Documents and Records in SharePoint, Really
SharePoint Saturday Richmond - Documents and Records in SharePoint, ReallyLiam Cleary [MVP]
 
SharePoint Saturday The Conference DC - Are you who you say you are share poi...
SharePoint Saturday The Conference DC - Are you who you say you are share poi...SharePoint Saturday The Conference DC - Are you who you say you are share poi...
SharePoint Saturday The Conference DC - Are you who you say you are share poi...Liam Cleary [MVP]
 
SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...Liam Cleary [MVP]
 
SharePoint Saturday The Conference DC - How the bcs saved my marriage
SharePoint Saturday The Conference DC - How the bcs saved my marriageSharePoint Saturday The Conference DC - How the bcs saved my marriage
SharePoint Saturday The Conference DC - How the bcs saved my marriageLiam Cleary [MVP]
 

Plus de Liam Cleary [MVP] (11)

SharePoint Fest Denver - Documents and Records Management in SharePoint
SharePoint Fest Denver - Documents and Records Management in SharePointSharePoint Fest Denver - Documents and Records Management in SharePoint
SharePoint Fest Denver - Documents and Records Management in SharePoint
 
The SUG - Documents & Records Management, Really
The SUG - Documents & Records Management, ReallyThe SUG - Documents & Records Management, Really
The SUG - Documents & Records Management, Really
 
Stop Those Prying Eyes Getting To Your Data SPTechCon
Stop Those Prying Eyes Getting To Your Data SPTechConStop Those Prying Eyes Getting To Your Data SPTechCon
Stop Those Prying Eyes Getting To Your Data SPTechCon
 
SharePoint Authentication And Authorization SPTechCon San Francisco
SharePoint Authentication And Authorization SPTechCon San FranciscoSharePoint Authentication And Authorization SPTechCon San Francisco
SharePoint Authentication And Authorization SPTechCon San Francisco
 
SharePoint Saturday Austin - Share point authentication and authorization
SharePoint Saturday Austin - Share point authentication and authorizationSharePoint Saturday Austin - Share point authentication and authorization
SharePoint Saturday Austin - Share point authentication and authorization
 
SharePoint Saturday Utah - Do you claim to be from the Azure Sky?
SharePoint Saturday Utah - Do you claim to be from the Azure Sky?SharePoint Saturday Utah - Do you claim to be from the Azure Sky?
SharePoint Saturday Utah - Do you claim to be from the Azure Sky?
 
SharePoint Saturday Utah - The Art of the Possible Keynote
SharePoint Saturday Utah - The Art of the Possible KeynoteSharePoint Saturday Utah - The Art of the Possible Keynote
SharePoint Saturday Utah - The Art of the Possible Keynote
 
SharePoint Saturday Richmond - Documents and Records in SharePoint, Really
SharePoint Saturday Richmond - Documents and Records in SharePoint, ReallySharePoint Saturday Richmond - Documents and Records in SharePoint, Really
SharePoint Saturday Richmond - Documents and Records in SharePoint, Really
 
SharePoint Saturday The Conference DC - Are you who you say you are share poi...
SharePoint Saturday The Conference DC - Are you who you say you are share poi...SharePoint Saturday The Conference DC - Are you who you say you are share poi...
SharePoint Saturday The Conference DC - Are you who you say you are share poi...
 
SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...
 
SharePoint Saturday The Conference DC - How the bcs saved my marriage
SharePoint Saturday The Conference DC - How the bcs saved my marriageSharePoint Saturday The Conference DC - How the bcs saved my marriage
SharePoint Saturday The Conference DC - How the bcs saved my marriage
 

Dernier

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Dernier (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Are you getting Sleepy. REST in SharePoint Apps

  • 1. Are You Getting Sleepy? REST with SharePoint Apps Liam Cleary
  • 2. About Me • Solution Architect @ Protiviti • 7 Time SharePoint MVP • Cover Everything-SharePoint • Development • Branding • Design • Architecture • Security • Dream about SharePoint, well sometimes
  • 6. What is REST, well SharePoint REST? REST • Representational State Transfer • Vocabulary Based • GET • POST • PUT • PATCH • DELETE SharePoint REST • HTTP-Based Architecture • Uses Nouns and Verbs • Items, GET, POST, PUT, DELETE • OData Provides the Description/Metadata • “/items(1)” • CSOM is the Processor • Returns JSON or XML • “/items/GetByTitle(„Test‟)”
  • 9. REST Filtering Option Description $expand Directs that related records should be retrieved in the record or collection being retrieved. $filter Specifies an expression or function that must evaluate to „true‟ for a record to be returned in the collection. $orderby Determines what values are used to order a collection of records. $select Specifies a sub set of properties to return. $skip Sets the number of records to skip before it retrieves records in a collection. $top Determines the maximum number of records to return.
  • 11. SharePoint 2013 REST Endpoints Site Webs Features Event Receivers Web Lists Items Publishin g Pages Variations Navigation User Profiles Users Profiles Activity Search Query Results Suggestio ns Taxonom y Managed Metadata
  • 12. SharePoint 2013 REST Security Local Current Context Request Digest Context Info Remote OAuth Access Token Cross Domain Cross Domain Request Executor SP.WebProxy HTTP WebRequest
  • 13. Endpoints – Example READ URL Returns _api/web/title “Title” of the current site _api/web/lists(guid'<list id>') Get the list from supplied ID _api/web/lists/getByTitle('Announcements') /fields Get all columns from the “Announcements” list _api/web/lists/getByTitle('Task')/items Get items from the “Task” list _api/web/siteusers Get users in the site _api/web/sitegroups Get user groups in the site _api/web/sitegroups(3)/users Get users that belong to group “3” _api/web/GetFolderByServerRelativeUrl('/S hared Documents') Get root folder of the Shared Documents library _api/web/GetFolderByServerRelativeUrl('/T est')/Files('a.txt')/$value Get “a.txt” from the “Test” document library
  • 15. SharePoint App Types Provider Hosted App Web - Optional Dedicated Hosting REST + OAuth CSOM Auto hosted App Web – Optional Windows/SQL Azure REST + Oauth CSOM SharePoint Hosted App Web REST JSOM
  • 16. SharePoint 2013 App User Experience Immersive Full Page Redirect to App Web Chrome will be needed Part Web/App Part Page(s) Loaded from App Web Fit into existing structure and chrome Custom Actions Ribbon ECB Redirect to App Web Part of the native UI
  • 17. Code
  • 18. SharePoint 2013 REST - jQuery jQuery.ajax({ url: “http://site url/_api/web/lists”, type: “GET”, headers: { “ACCEPT”: “application/json;odata=verbose”, “Authorization”: “Bearer “ + accessToken }, })
  • 19. SharePoint 2013 REST – Cross Domain Library var executor; executor = new SP.RequestExecutor(appweburl); executor.executeAsync( { url: appweburl + "/_api/SP.AppContextSite(@target)/web/Folders?@target='" + hostweburl + "'", method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: getSuccessHandler, error: getErrorHandler }
  • 20. SharePoint 2013 REST – C# HttpWebRequest endpointRequest = (HttpWebRequest)HttpWebRequest.Create("http:// <site url>/_api/web/lists"); endpointRequest.Method = "GET"; endpointRequest.Accept = "application/json;odata=verbose"; endpointRequest.Headers.Add("Authorization", "Bearer " + accessToken); HttpWebResponse endpointResponse = (HttpWebResponse)endpointRequest.GetResponse();
  • 21. Show Me The Money
  • 23. Thoughts Feature .NET Framework / Silverlight object models JavaScript object model REST / OData Endpoints Object-oriented programming Yes Yes No Batch processing Yes Yes No APIs for conditional processing and exception handling Yes No No Availability of LINQ syntax Yes No No Combining list data from different SharePoint web applications Yes No Yes Familiarity to experienced REST/OData developers No No Yes Similarity to non-Windows programming or JavaScript programming No Yes Yes Strong typing for list item fields No (except with LINQ) No Yes, from Windows platform No, from JavaScript Leveraging jQuery, Knockout, and other JavaScript libraries No Yes No, from Windows platform Yes, from JavaScript
  • 24. Thoughts • Data is returned as XML in AtomPub • Extended by the OData Format – “accept: application/json;odata=verbose” • OData and SharePoint REST are not the same • Choose the right data retrieval • Set the correct permissions for your SharePoint App
  • 25. Resources • http://www.mavention.nl/blog/configuring-sharepoint-2013-search- rest-api-anonymous-users • http://msdn.microsoft.com/en-us/library/jj164022.aspx • http://msdn.microsoft.com/en-us/magazine/dn198245.aspx • http://msdn.microsoft.com/en-us/library/dn292553.aspx • http://msdn.microsoft.com/en-us/library/dn292552.aspx • http://msdn.microsoft.com/en-us/library/fp142380.aspx
  • 26. Resources • Please remember to turn in your filled out bingo cards and event evaluations for prizes. • SharePint is sponsored by Slalom at Whiskey Trader (Between 55th and 56th on 6th Avenue). • Follow SharePoint Saturday New York City on Twitter @spsnyc and hashtag #spsnyc
  • 27. Thank You to the Sponsors