SlideShare a Scribd company logo
chris.beckett@obeflow.com
www.obeflow.com
(425) 522-3727
Enterprise Content Management and Business Process Automation Software as a Service
Understanding and Programming
the SharePoint REST API
About Chris Beckett
24+10
MCM
MCT
MCSE
MCPD
Entrepreneur
Solutions Architect
Systems Engineer
Trainer and Author
chris.beckett@obeflow.com
@sharepointbits
blog.sharepointbits.com
Agenda
Introduction to
SharePoint Web
Services
Working with
REST and ODATA
Services
Programming
with the
REST API
Agenda
Introduction to
SharePoint Web
Services Working with
REST and ODATA
Services
Programming
with the
REST API
Available SharePoint Web Services
• Open Standards
• RPC Model
• Protocol Agnostic
• XML
• Microsoft Proprietary
• Batch RPC Model
• Client Runtime
• XML / JSON
• Open Standards
• REST Model
• HTTP Only
• ATOM / JSON
SOAP
Web Services
(ASMX)
Client Side Object
Model
(CSOM/JSOM)
REST API
(ODATA)
SharePoint 2010 Web Service Access
SOAP CSOM REST
Lists and Libraries
Site and List Settings
Site Security
Workflow
Search
Managed Metadata
User Profiles
Publishing
SharePoint 2010 Web Service Clients
SOAP CSOM REST
JavaScript
Silverlight
.NET
Windows Phone
Other Languages
InfoPath Receive
InfoPath Submit
BCS WCF Connector
SharePoint 2013 Web Service Access
SOAP CSOM REST
Lists and Libraries
Site and List Settings
Site Security
Workflow
Search
Managed Metadata
User Profiles
Publishing
Deprecated
SharePoint 2010 Web Service Clients
SOAP CSOM REST
JavaScript
Silverlight
.NET
Windows Phone
Other Languages
InfoPath Receive
InfoPath Submit
BCS WCF Connector
Deprecated
What is SOAP?
Created by Microsoft in 1998 / W3C Standard
Protocol Agnostic / Common to use HTTP
RPC Message Pattern (Request/Response)
XML Schema used for Message Structures
SharePoint Web Service Addresses
Web Service Web Service Address
Search http://<site>/_vti_bin/search.asmx
User Profiles http://<site>/_vti_bin/userprofileservice.asmx
Sites http://<site>/_vti_bin/sites.asmx
Lists http://<site>/_vti_bin/lists.asmx
Permissions http://<site>/_vti_bin/permissions.asmx
Copy http://<site>/_vti_bin/copy.asmx
31 Public Web Services (25+6) in SharePoint
SOAP Request Message Format
SOAP Envelope
SOAP Body
Method and
Parameters
SOAP Considerations
• All Versions of SharePoint
• Ubiquitous
• Protocol Agnostic
• Language Agnostic
• Access to Enterprise Services
• Designed to work with Proxy
• Not JavaScript Friendly
• Verbose Xml Data
• No Anonymous
What is the CSOM?
Proprietary Microsoft SharePoint Client API
.NET / Silverlight / WP7 / ECMAScript
Mimics Server-side Object Model
Proprietary Message Transfer Format
CSOM Architecture
CSOM (.NET)
Create a Context
Load the Context
Execute Query
Access Properties
CSOM Considerations
• Efficient for Batch Operations
• Familiar for SharePoint
Developers
• Supports LINQ Queries
• Works with Anonymous
• Less Efficient for Simple
Operations
• Unfamiliar to Web Developers
• Limited # of Client Runtimes
• Microsoft Proprietary
What is REST?
Representational State Transfer
Web Addressable Resources / Hyperlink-able
Maps CRUD operations with HTTP Verbs
Commonly uses JSON for Data Messages
Anatomy of a REST Call
Request URLHTTP Method
HTTP Body with
Encoded DataHeaders
HTTP Status Codes
Status Code Description
200 OK The server successfully processed the request.
400 Bad Request The server didn't understand the request.
401 Unauthorized The request requires authentication.
404 Not Found The server can't find the requested page.
500 Internal Server Error The server encountered an error.
Calling a web service
requires checking the
status code to validate
success
Data Encoding - ATOMPUB
Data Encoding - JSON
REST Considerations
• Efficient for simple operations
• Familiar to Web Developers
• HTTP and open standards
• Very JavaScript Friendly
• Limited support for Anonymous
• Complex for batch operations
• Unfamiliar to SharePoint
Developers
• Requires knowledge of HTTP
protocol and programming
Anatomy of a REST
Call
 Using the List Data Service
 Using the Client REST API
 Data Encoding
Agenda
Introduction to
SharePoint Web
Services
Working with
REST and ODATA
Services Programming
with the
REST API
ODATA Operations and Parameters
GET (Retrieve)
POST (Create)
PUT (Update All Fields)
DELETE (Delete)
MERGE (Update Specific)
$filter={simple predicate}
$expand={Entity}
$order by={property}
$skip={n}
$top={n}
$metadata
Operations Parameters
ODATA Query Operators
Area Supported Not Supported
Numeric
Comparisons
• Lt, Le
• Gt, Ge
• Eq, Ne
• add, sub, mul, div, mod
• round, floor, ceiling
String
Comparisons
• startsWith
• substringof
• Eq
• Ne
• endsWith, trim
• substring, replace, concat
• tolower, toupper
Date and Time
Functions
• day(), month(), year()
• hour(), minute(),
second()
• DateTimeRangesOverlap
Querying with
ODATA
 $Top and $Skip
 $Filter
 $Select
 $OrderBy
 $Expand
Agenda
Introduction to
SharePoint Web
Services
Working with
REST and ODATA
Services
Programming
with the
REST API
Programming Tools / Platforms
• C++
• C#
• VB.NET
• PHP
• Java
• Datajs
• jQuery
• Sencha Rest Connector
• JayData
• RequestExecutor
Compiled Languages JavaScript Libraries
List Data Service Access Points
Area Access Point
Lists http://server/site/_vti_bin/ListData.svc
List http://server/site/_vti_bin/ListData.svc/Tasks
Client REST Service Access Points
Area Access Point
Site http://server/site/_api/site
Web http://server/site/_api/web
Lists http://server/site/_api/web/lists
List http://server/site/_api/web/lists/getbytitle(‘Tasks’)
User Profile http://server/site/_api/SP.UserProfiles.PeopleManager
Search http://server/site/_api/search
Publishing http://server/site/_api/publishing
Visual Studio
List Data Service 2010 (ECMA Script)
Request Executor (SharePoint 2013)
Calling SharePoint
REST APIs
 HTTP Verbs
 Accept Headers
 Authentication
 eTags and Concurrency
More Information
Choose the Right API set with SharePoint 2013
http://msdn.microsoft.com/en-us/library/jj164060.aspx
Complete Basic Operations with the SharePoint 2013 Client Library
http://msdn.microsoft.com/en-us/library/fp179912.aspx
Programming using the SharePoint 2013 REST Service
http://msdn.microsoft.com/en-us/library/fp142385.aspx
SharePoint 2010 Web Services
http://msdn.microsoft.com/en-us/library/ee705814(v=office.14).aspx
Accessing SharePoint 2010 Lists by Using WCF Data Services
http://msdn.microsoft.com/en-us/library/hh134614(v=office.14).aspx
Tools and Utilities
LinqPad – Learn ODATA Queries with Linq
http://www.linqpad.net/
RESTClient – Java Application for Testing REST Programming
https://code.google.com/p/rest-client/
CAML Designer for SharePoint 2010 and 2013
http://sharepoint.biwug.be/SitePages/Caml_Designer.aspx
Fiddler – HTTP Debugger
http://www.fiddler2.com/fiddler2/
SharePoint 2013 Search Query Tool
http://sp2013searchtool.codeplex.com/
Questions
Thank you for attending!
Please complete your
evaluations. Your feedback is
appreciated 
chris.beckett@obeflow.com
(425) 522-3727
@sharepointbits
blog.sharepointbits.com

More Related Content

What's hot

Cucumber and Spock Primer
Cucumber and Spock PrimerCucumber and Spock Primer
Cucumber and Spock Primer
John Ferguson Smart Limited
 
Attacking GraphQL
Attacking GraphQLAttacking GraphQL
Attacking GraphQL
KavishaSheth1
 
Angular data binding
Angular data binding Angular data binding
Angular data binding
Sultan Ahmed
 
JVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir IvanovJVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir IvanovZeroTurnaround
 
Introduction to Linked Data 1/5
Introduction to Linked Data 1/5Introduction to Linked Data 1/5
Introduction to Linked Data 1/5Juan Sequeda
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
Harshit Choudhary
 
Intro to Asynchronous Javascript
Intro to Asynchronous JavascriptIntro to Asynchronous Javascript
Intro to Asynchronous Javascript
Garrett Welson
 
생산성을 높여주는 iOS 개발 방법들.pdf
생산성을 높여주는 iOS 개발 방법들.pdf생산성을 높여주는 iOS 개발 방법들.pdf
생산성을 높여주는 iOS 개발 방법들.pdf
ssuserb942d2
 
Object Oriented Javascript
Object Oriented JavascriptObject Oriented Javascript
Object Oriented Javascript
NexThoughts Technologies
 
Testando API REST - Parte 1
Testando API REST - Parte 1Testando API REST - Parte 1
Testando API REST - Parte 1
alinebiath
 
gRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquaregRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at Square
Apigee | Google Cloud
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentation
ritika1
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
Hoang Long
 
Mocking APIs Collaboratively with Postman
Mocking APIs Collaboratively with PostmanMocking APIs Collaboratively with Postman
Mocking APIs Collaboratively with Postman
Nordic APIs
 
Asynchronous javascript
 Asynchronous javascript Asynchronous javascript
Asynchronous javascript
Eman Mohamed
 
Spring GraphQL
Spring GraphQLSpring GraphQL
Spring GraphQL
VMware Tanzu
 
L'API Collector dans tous ses états
L'API Collector dans tous ses étatsL'API Collector dans tous ses états
L'API Collector dans tous ses états
José Paumard
 
Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
Jeevesh Pandey
 

What's hot (20)

Cucumber and Spock Primer
Cucumber and Spock PrimerCucumber and Spock Primer
Cucumber and Spock Primer
 
Spring annotation
Spring annotationSpring annotation
Spring annotation
 
Attacking GraphQL
Attacking GraphQLAttacking GraphQL
Attacking GraphQL
 
Angular data binding
Angular data binding Angular data binding
Angular data binding
 
JVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir IvanovJVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir Ivanov
 
Introduction to Linked Data 1/5
Introduction to Linked Data 1/5Introduction to Linked Data 1/5
Introduction to Linked Data 1/5
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Intro to Asynchronous Javascript
Intro to Asynchronous JavascriptIntro to Asynchronous Javascript
Intro to Asynchronous Javascript
 
Optional in Java 8
Optional in Java 8Optional in Java 8
Optional in Java 8
 
생산성을 높여주는 iOS 개발 방법들.pdf
생산성을 높여주는 iOS 개발 방법들.pdf생산성을 높여주는 iOS 개발 방법들.pdf
생산성을 높여주는 iOS 개발 방법들.pdf
 
Object Oriented Javascript
Object Oriented JavascriptObject Oriented Javascript
Object Oriented Javascript
 
Testando API REST - Parte 1
Testando API REST - Parte 1Testando API REST - Parte 1
Testando API REST - Parte 1
 
gRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquaregRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at Square
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentation
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
Mocking APIs Collaboratively with Postman
Mocking APIs Collaboratively with PostmanMocking APIs Collaboratively with Postman
Mocking APIs Collaboratively with Postman
 
Asynchronous javascript
 Asynchronous javascript Asynchronous javascript
Asynchronous javascript
 
Spring GraphQL
Spring GraphQLSpring GraphQL
Spring GraphQL
 
L'API Collector dans tous ses états
L'API Collector dans tous ses étatsL'API Collector dans tous ses états
L'API Collector dans tous ses états
 
Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
 

Viewers also liked

SharePoint 2013 REST API & Remote Authentication
SharePoint 2013 REST API & Remote AuthenticationSharePoint 2013 REST API & Remote Authentication
SharePoint 2013 REST API & Remote AuthenticationAdil Ansari
 
SharePoint 2013 REST API tips & tricks
SharePoint 2013 REST API tips & tricksSharePoint 2013 REST API tips & tricks
SharePoint 2013 REST API tips & tricks
Giuseppe Marchi
 
Understanding the REST API of SharePoint 2013
Understanding the REST API of SharePoint 2013Understanding the REST API of SharePoint 2013
Understanding the REST API of SharePoint 2013
SPSSTHLM
 
ORCID Member Site Integration: Using the API
ORCID Member Site Integration: Using the APIORCID Member Site Integration: Using the API
ORCID Member Site Integration: Using the API
ORCID, Inc
 
The Digital Workplace - What are the elements - How do we achieve success - s...
The Digital Workplace - What are the elements - How do we achieve success - s...The Digital Workplace - What are the elements - How do we achieve success - s...
The Digital Workplace - What are the elements - How do we achieve success - s...
Ruven Gotz
 
SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)
Kashif Imran
 
Succeeding With SharePoint In Seven Steps - Share Atlanta
Succeeding With SharePoint In Seven Steps - Share AtlantaSucceeding With SharePoint In Seven Steps - Share Atlanta
Succeeding With SharePoint In Seven Steps - Share AtlantaRichard Harbridge
 
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
Rob Windsor
 
Getting started with SharePoint 2013 online development
Getting started with SharePoint 2013 online developmentGetting started with SharePoint 2013 online development
Getting started with SharePoint 2013 online development
Jeremy Thake
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOM
Mark Rackley
 
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
Kunaal Kapoor
 
Power Up with PowerApps
Power Up with PowerAppsPower Up with PowerApps
Power Up with PowerApps
Bobby Chang
 
A Checklist for Every API Call
A Checklist for Every API CallA Checklist for Every API Call
A Checklist for Every API Call
Apigee | Google Cloud
 
10 Reasons to Avoid Folders in SharePoint 2013/2010
10 Reasons to Avoid Folders in SharePoint 2013/201010 Reasons to Avoid Folders in SharePoint 2013/2010
10 Reasons to Avoid Folders in SharePoint 2013/2010
Bobby Chang
 
Architecting Microservices in .Net
Architecting Microservices in .NetArchitecting Microservices in .Net
Architecting Microservices in .Net
Richard Banks
 
10 Best SharePoint Features You’ve Never Used (But Should)
10 Best SharePoint Features You’ve Never Used (But Should)10 Best SharePoint Features You’ve Never Used (But Should)
10 Best SharePoint Features You’ve Never Used (But Should)
Christian Buckley
 
Build and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API GatewayBuild and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API Gateway
Amazon Web Services
 
SharePoint Permissions Worst Practices
SharePoint Permissions Worst PracticesSharePoint Permissions Worst Practices
SharePoint Permissions Worst Practices
Bobby Chang
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
Ron Reiter
 
10 Best Productivity Features in SharePoint 2013
10 Best Productivity Features in SharePoint 201310 Best Productivity Features in SharePoint 2013
10 Best Productivity Features in SharePoint 2013
Christian Buckley
 

Viewers also liked (20)

SharePoint 2013 REST API & Remote Authentication
SharePoint 2013 REST API & Remote AuthenticationSharePoint 2013 REST API & Remote Authentication
SharePoint 2013 REST API & Remote Authentication
 
SharePoint 2013 REST API tips & tricks
SharePoint 2013 REST API tips & tricksSharePoint 2013 REST API tips & tricks
SharePoint 2013 REST API tips & tricks
 
Understanding the REST API of SharePoint 2013
Understanding the REST API of SharePoint 2013Understanding the REST API of SharePoint 2013
Understanding the REST API of SharePoint 2013
 
ORCID Member Site Integration: Using the API
ORCID Member Site Integration: Using the APIORCID Member Site Integration: Using the API
ORCID Member Site Integration: Using the API
 
The Digital Workplace - What are the elements - How do we achieve success - s...
The Digital Workplace - What are the elements - How do we achieve success - s...The Digital Workplace - What are the elements - How do we achieve success - s...
The Digital Workplace - What are the elements - How do we achieve success - s...
 
SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)
 
Succeeding With SharePoint In Seven Steps - Share Atlanta
Succeeding With SharePoint In Seven Steps - Share AtlantaSucceeding With SharePoint In Seven Steps - Share Atlanta
Succeeding With SharePoint In Seven Steps - Share Atlanta
 
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
 
Getting started with SharePoint 2013 online development
Getting started with SharePoint 2013 online developmentGetting started with SharePoint 2013 online development
Getting started with SharePoint 2013 online development
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOM
 
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
 
Power Up with PowerApps
Power Up with PowerAppsPower Up with PowerApps
Power Up with PowerApps
 
A Checklist for Every API Call
A Checklist for Every API CallA Checklist for Every API Call
A Checklist for Every API Call
 
10 Reasons to Avoid Folders in SharePoint 2013/2010
10 Reasons to Avoid Folders in SharePoint 2013/201010 Reasons to Avoid Folders in SharePoint 2013/2010
10 Reasons to Avoid Folders in SharePoint 2013/2010
 
Architecting Microservices in .Net
Architecting Microservices in .NetArchitecting Microservices in .Net
Architecting Microservices in .Net
 
10 Best SharePoint Features You’ve Never Used (But Should)
10 Best SharePoint Features You’ve Never Used (But Should)10 Best SharePoint Features You’ve Never Used (But Should)
10 Best SharePoint Features You’ve Never Used (But Should)
 
Build and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API GatewayBuild and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API Gateway
 
SharePoint Permissions Worst Practices
SharePoint Permissions Worst PracticesSharePoint Permissions Worst Practices
SharePoint Permissions Worst Practices
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
 
10 Best Productivity Features in SharePoint 2013
10 Best Productivity Features in SharePoint 201310 Best Productivity Features in SharePoint 2013
10 Best Productivity Features in SharePoint 2013
 

Similar to Understanding and programming the SharePoint REST API

SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechConSharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SPTechCon
 
Full Stack Developer
Full Stack DeveloperFull Stack Developer
Full Stack Developer
Akbar Uddin
 
Coding 100-session-slides
Coding 100-session-slidesCoding 100-session-slides
Coding 100-session-slides
Cisco DevNet
 
Web api using rest based architecture
Web api using rest based architectureWeb api using rest based architecture
Web api using rest based architecture
Soham Kulkarni
 
Industrial training in .net
Industrial training in .netIndustrial training in .net
Industrial training in .net
ResistiveTechnosource Pvt. Ltd.
 
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
 
Deploying and Managing PowerPivot for SharePoint
Deploying and Managing PowerPivot for SharePointDeploying and Managing PowerPivot for SharePoint
Deploying and Managing PowerPivot for SharePoint
Denny Lee
 
Rest API and Client OM for Developer
Rest API and Client OM for DeveloperRest API and Client OM for Developer
Rest API and Client OM for Developer
InnoTech
 
Social Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech DaySocial Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech Day
TechMaster Vietnam
 
Oracle application framework (oaf) online training
Oracle application framework (oaf) online trainingOracle application framework (oaf) online training
Oracle application framework (oaf) online training
Glory IT Technologies Pvt. Ltd.
 
Building high performance
Building high performanceBuilding high performance
Building high performance
Roy Sheinfeld
 
Austin Day of Rest - Introduction
Austin Day of Rest - IntroductionAustin Day of Rest - Introduction
Austin Day of Rest - Introduction
HandsOnWP.com
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기lanslote
 
Comsharepoint2013pdf
Comsharepoint2013pdfComsharepoint2013pdf
Comsharepoint2013pdf
Kamal Pandey
 
API Testing. Streamline your testing process.
API Testing. Streamline your testing process.API Testing. Streamline your testing process.
API Testing. Streamline your testing process.
Andrey Oleynik
 
Metaworks4 intro
Metaworks4 introMetaworks4 intro
Metaworks4 intro
uEngine Solutions
 
Best Practices to SharePoint Architecture Fundamentals NZ & AUS
Best Practices to SharePoint Architecture Fundamentals NZ & AUSBest Practices to SharePoint Architecture Fundamentals NZ & AUS
Best Practices to SharePoint Architecture Fundamentals NZ & AUS
guest7c2e070
 
Java UI Course Content
Java UI Course ContentJava UI Course Content
Java UI Course Content
NarendrareddyAvulaLI
 
Session 7 - Integrating share point with silverlight firestarter
Session 7 - Integrating share point with silverlight firestarterSession 7 - Integrating share point with silverlight firestarter
Session 7 - Integrating share point with silverlight firestarterMithun T. Dhar
 

Similar to Understanding and programming the SharePoint REST API (20)

SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechConSharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
 
Full Stack Developer
Full Stack DeveloperFull Stack Developer
Full Stack Developer
 
Coding 100-session-slides
Coding 100-session-slidesCoding 100-session-slides
Coding 100-session-slides
 
Web api using rest based architecture
Web api using rest based architectureWeb api using rest based architecture
Web api using rest based architecture
 
Industrial training in .net
Industrial training in .netIndustrial training in .net
Industrial training in .net
 
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...
 
Deploying and Managing PowerPivot for SharePoint
Deploying and Managing PowerPivot for SharePointDeploying and Managing PowerPivot for SharePoint
Deploying and Managing PowerPivot for SharePoint
 
Rest API and Client OM for Developer
Rest API and Client OM for DeveloperRest API and Client OM for Developer
Rest API and Client OM for Developer
 
Social Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech DaySocial Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech Day
 
Oracle application framework (oaf) online training
Oracle application framework (oaf) online trainingOracle application framework (oaf) online training
Oracle application framework (oaf) online training
 
Building high performance
Building high performanceBuilding high performance
Building high performance
 
Austin Day of Rest - Introduction
Austin Day of Rest - IntroductionAustin Day of Rest - Introduction
Austin Day of Rest - Introduction
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
 
Comsharepoint2013pdf
Comsharepoint2013pdfComsharepoint2013pdf
Comsharepoint2013pdf
 
API Testing. Streamline your testing process.
API Testing. Streamline your testing process.API Testing. Streamline your testing process.
API Testing. Streamline your testing process.
 
Metaworks4 intro
Metaworks4 introMetaworks4 intro
Metaworks4 intro
 
Best Practices to SharePoint Architecture Fundamentals NZ & AUS
Best Practices to SharePoint Architecture Fundamentals NZ & AUSBest Practices to SharePoint Architecture Fundamentals NZ & AUS
Best Practices to SharePoint Architecture Fundamentals NZ & AUS
 
Java UI Course Content
Java UI Course ContentJava UI Course Content
Java UI Course Content
 
06 web api
06 web api06 web api
06 web api
 
Session 7 - Integrating share point with silverlight firestarter
Session 7 - Integrating share point with silverlight firestarterSession 7 - Integrating share point with silverlight firestarter
Session 7 - Integrating share point with silverlight firestarter
 

Recently uploaded

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 

Recently uploaded (20)

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 

Understanding and programming the SharePoint REST API

  • 1. chris.beckett@obeflow.com www.obeflow.com (425) 522-3727 Enterprise Content Management and Business Process Automation Software as a Service Understanding and Programming the SharePoint REST API
  • 2. About Chris Beckett 24+10 MCM MCT MCSE MCPD Entrepreneur Solutions Architect Systems Engineer Trainer and Author chris.beckett@obeflow.com @sharepointbits blog.sharepointbits.com
  • 3. Agenda Introduction to SharePoint Web Services Working with REST and ODATA Services Programming with the REST API
  • 4. Agenda Introduction to SharePoint Web Services Working with REST and ODATA Services Programming with the REST API
  • 5. Available SharePoint Web Services • Open Standards • RPC Model • Protocol Agnostic • XML • Microsoft Proprietary • Batch RPC Model • Client Runtime • XML / JSON • Open Standards • REST Model • HTTP Only • ATOM / JSON SOAP Web Services (ASMX) Client Side Object Model (CSOM/JSOM) REST API (ODATA)
  • 6. SharePoint 2010 Web Service Access SOAP CSOM REST Lists and Libraries Site and List Settings Site Security Workflow Search Managed Metadata User Profiles Publishing
  • 7. SharePoint 2010 Web Service Clients SOAP CSOM REST JavaScript Silverlight .NET Windows Phone Other Languages InfoPath Receive InfoPath Submit BCS WCF Connector
  • 8. SharePoint 2013 Web Service Access SOAP CSOM REST Lists and Libraries Site and List Settings Site Security Workflow Search Managed Metadata User Profiles Publishing Deprecated
  • 9. SharePoint 2010 Web Service Clients SOAP CSOM REST JavaScript Silverlight .NET Windows Phone Other Languages InfoPath Receive InfoPath Submit BCS WCF Connector Deprecated
  • 10. What is SOAP? Created by Microsoft in 1998 / W3C Standard Protocol Agnostic / Common to use HTTP RPC Message Pattern (Request/Response) XML Schema used for Message Structures
  • 11. SharePoint Web Service Addresses Web Service Web Service Address Search http://<site>/_vti_bin/search.asmx User Profiles http://<site>/_vti_bin/userprofileservice.asmx Sites http://<site>/_vti_bin/sites.asmx Lists http://<site>/_vti_bin/lists.asmx Permissions http://<site>/_vti_bin/permissions.asmx Copy http://<site>/_vti_bin/copy.asmx 31 Public Web Services (25+6) in SharePoint
  • 12. SOAP Request Message Format SOAP Envelope SOAP Body Method and Parameters
  • 13. SOAP Considerations • All Versions of SharePoint • Ubiquitous • Protocol Agnostic • Language Agnostic • Access to Enterprise Services • Designed to work with Proxy • Not JavaScript Friendly • Verbose Xml Data • No Anonymous
  • 14. What is the CSOM? Proprietary Microsoft SharePoint Client API .NET / Silverlight / WP7 / ECMAScript Mimics Server-side Object Model Proprietary Message Transfer Format
  • 16. CSOM (.NET) Create a Context Load the Context Execute Query Access Properties
  • 17. CSOM Considerations • Efficient for Batch Operations • Familiar for SharePoint Developers • Supports LINQ Queries • Works with Anonymous • Less Efficient for Simple Operations • Unfamiliar to Web Developers • Limited # of Client Runtimes • Microsoft Proprietary
  • 18. What is REST? Representational State Transfer Web Addressable Resources / Hyperlink-able Maps CRUD operations with HTTP Verbs Commonly uses JSON for Data Messages
  • 19. Anatomy of a REST Call Request URLHTTP Method HTTP Body with Encoded DataHeaders
  • 20. HTTP Status Codes Status Code Description 200 OK The server successfully processed the request. 400 Bad Request The server didn't understand the request. 401 Unauthorized The request requires authentication. 404 Not Found The server can't find the requested page. 500 Internal Server Error The server encountered an error. Calling a web service requires checking the status code to validate success
  • 21. Data Encoding - ATOMPUB
  • 23. REST Considerations • Efficient for simple operations • Familiar to Web Developers • HTTP and open standards • Very JavaScript Friendly • Limited support for Anonymous • Complex for batch operations • Unfamiliar to SharePoint Developers • Requires knowledge of HTTP protocol and programming
  • 24. Anatomy of a REST Call  Using the List Data Service  Using the Client REST API  Data Encoding
  • 25. Agenda Introduction to SharePoint Web Services Working with REST and ODATA Services Programming with the REST API
  • 26.
  • 27. ODATA Operations and Parameters GET (Retrieve) POST (Create) PUT (Update All Fields) DELETE (Delete) MERGE (Update Specific) $filter={simple predicate} $expand={Entity} $order by={property} $skip={n} $top={n} $metadata Operations Parameters
  • 28. ODATA Query Operators Area Supported Not Supported Numeric Comparisons • Lt, Le • Gt, Ge • Eq, Ne • add, sub, mul, div, mod • round, floor, ceiling String Comparisons • startsWith • substringof • Eq • Ne • endsWith, trim • substring, replace, concat • tolower, toupper Date and Time Functions • day(), month(), year() • hour(), minute(), second() • DateTimeRangesOverlap
  • 29. Querying with ODATA  $Top and $Skip  $Filter  $Select  $OrderBy  $Expand
  • 30. Agenda Introduction to SharePoint Web Services Working with REST and ODATA Services Programming with the REST API
  • 31. Programming Tools / Platforms • C++ • C# • VB.NET • PHP • Java • Datajs • jQuery • Sencha Rest Connector • JayData • RequestExecutor Compiled Languages JavaScript Libraries
  • 32. List Data Service Access Points Area Access Point Lists http://server/site/_vti_bin/ListData.svc List http://server/site/_vti_bin/ListData.svc/Tasks
  • 33. Client REST Service Access Points Area Access Point Site http://server/site/_api/site Web http://server/site/_api/web Lists http://server/site/_api/web/lists List http://server/site/_api/web/lists/getbytitle(‘Tasks’) User Profile http://server/site/_api/SP.UserProfiles.PeopleManager Search http://server/site/_api/search Publishing http://server/site/_api/publishing
  • 35. List Data Service 2010 (ECMA Script)
  • 37. Calling SharePoint REST APIs  HTTP Verbs  Accept Headers  Authentication  eTags and Concurrency
  • 38. More Information Choose the Right API set with SharePoint 2013 http://msdn.microsoft.com/en-us/library/jj164060.aspx Complete Basic Operations with the SharePoint 2013 Client Library http://msdn.microsoft.com/en-us/library/fp179912.aspx Programming using the SharePoint 2013 REST Service http://msdn.microsoft.com/en-us/library/fp142385.aspx SharePoint 2010 Web Services http://msdn.microsoft.com/en-us/library/ee705814(v=office.14).aspx Accessing SharePoint 2010 Lists by Using WCF Data Services http://msdn.microsoft.com/en-us/library/hh134614(v=office.14).aspx
  • 39. Tools and Utilities LinqPad – Learn ODATA Queries with Linq http://www.linqpad.net/ RESTClient – Java Application for Testing REST Programming https://code.google.com/p/rest-client/ CAML Designer for SharePoint 2010 and 2013 http://sharepoint.biwug.be/SitePages/Caml_Designer.aspx Fiddler – HTTP Debugger http://www.fiddler2.com/fiddler2/ SharePoint 2013 Search Query Tool http://sp2013searchtool.codeplex.com/
  • 40. Questions Thank you for attending! Please complete your evaluations. Your feedback is appreciated  chris.beckett@obeflow.com (425) 522-3727 @sharepointbits blog.sharepointbits.com