SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Similar a 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
 

Similar a 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 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
 
Rest
RestRest
Rest
 
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
 

Más 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]
 

Más 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
 

Último

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Último (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

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