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

Más contenido relacionado

La actualidad más candente

シーケンス図とアクティビティ図と状態遷移図
シーケンス図とアクティビティ図と状態遷移図シーケンス図とアクティビティ図と状態遷移図
シーケンス図とアクティビティ図と状態遷移図akipii Oga
 
Swift in SwiftUI
Swift in SwiftUISwift in SwiftUI
Swift in SwiftUIBongwon Lee
 
From framework coupled code to #microservices through #DDD /by @codelytv
From framework coupled code to #microservices through #DDD /by @codelytvFrom framework coupled code to #microservices through #DDD /by @codelytv
From framework coupled code to #microservices through #DDD /by @codelytvCodelyTV
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot IntroductionJeevesh Pandey
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action Alex Movila
 
Si 프로젝트에서 바라보는...traditional vs agile
Si 프로젝트에서 바라보는...traditional vs agileSi 프로젝트에서 바라보는...traditional vs agile
Si 프로젝트에서 바라보는...traditional vs agileKiwon Kyung
 
React(TypeScript) + Go + Auth0 で実現する管理画面
React(TypeScript) + Go + Auth0 で実現する管理画面React(TypeScript) + Go + Auth0 で実現する管理画面
React(TypeScript) + Go + Auth0 で実現する管理画面KentaEndoh
 
Spring the Ripper by Evgeny Borisov
Spring the Ripper by Evgeny BorisovSpring the Ripper by Evgeny Borisov
Spring the Ripper by Evgeny BorisovJavaDayUA
 
初探 Kotlin Multiplatform
初探 Kotlin Multiplatform初探 Kotlin Multiplatform
初探 Kotlin MultiplatformShengyou Fan
 
Minimal standard c program
Minimal standard c programMinimal standard c program
Minimal standard c programSwain Loda
 
今さら聞けないDiとspring
今さら聞けないDiとspring今さら聞けないDiとspring
今さら聞けないDiとspring土岐 孝平
 
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇Shengyou Fan
 
RxJS & Angular Reactive Forms @ Codemotion 2019
RxJS & Angular Reactive Forms @ Codemotion 2019RxJS & Angular Reactive Forms @ Codemotion 2019
RxJS & Angular Reactive Forms @ Codemotion 2019Fabio Biondi
 
はじめてのCouch db
はじめてのCouch dbはじめてのCouch db
はじめてのCouch dbEiji Kuroda
 
The New JavaScript: ES6
The New JavaScript: ES6The New JavaScript: ES6
The New JavaScript: ES6Rob Eisenberg
 
[2019] 점진적으로 프런트엔드 프레임워크 교체하기
[2019] 점진적으로 프런트엔드 프레임워크 교체하기[2019] 점진적으로 프런트엔드 프레임워크 교체하기
[2019] 점진적으로 프런트엔드 프레임워크 교체하기NHN FORWARD
 

La actualidad más candente (20)

シーケンス図とアクティビティ図と状態遷移図
シーケンス図とアクティビティ図と状態遷移図シーケンス図とアクティビティ図と状態遷移図
シーケンス図とアクティビティ図と状態遷移図
 
Swift in SwiftUI
Swift in SwiftUISwift in SwiftUI
Swift in SwiftUI
 
From framework coupled code to #microservices through #DDD /by @codelytv
From framework coupled code to #microservices through #DDD /by @codelytvFrom framework coupled code to #microservices through #DDD /by @codelytv
From framework coupled code to #microservices through #DDD /by @codelytv
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Si 프로젝트에서 바라보는...traditional vs agile
Si 프로젝트에서 바라보는...traditional vs agileSi 프로젝트에서 바라보는...traditional vs agile
Si 프로젝트에서 바라보는...traditional vs agile
 
React(TypeScript) + Go + Auth0 で実現する管理画面
React(TypeScript) + Go + Auth0 で実現する管理画面React(TypeScript) + Go + Auth0 で実現する管理画面
React(TypeScript) + Go + Auth0 で実現する管理画面
 
Spring the Ripper by Evgeny Borisov
Spring the Ripper by Evgeny BorisovSpring the Ripper by Evgeny Borisov
Spring the Ripper by Evgeny Borisov
 
初探 Kotlin Multiplatform
初探 Kotlin Multiplatform初探 Kotlin Multiplatform
初探 Kotlin Multiplatform
 
Minimal standard c program
Minimal standard c programMinimal standard c program
Minimal standard c program
 
Server side rendering review
Server side rendering reviewServer side rendering review
Server side rendering review
 
Spring framework core
Spring framework coreSpring framework core
Spring framework core
 
今さら聞けないDiとspring
今さら聞けないDiとspring今さら聞けないDiとspring
今さら聞けないDiとspring
 
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
 
What’s new in cloud run 2021 後期
What’s new in cloud run 2021 後期What’s new in cloud run 2021 後期
What’s new in cloud run 2021 後期
 
RxJS & Angular Reactive Forms @ Codemotion 2019
RxJS & Angular Reactive Forms @ Codemotion 2019RxJS & Angular Reactive Forms @ Codemotion 2019
RxJS & Angular Reactive Forms @ Codemotion 2019
 
はじめてのCouch db
はじめてのCouch dbはじめてのCouch db
はじめてのCouch db
 
The New JavaScript: ES6
The New JavaScript: ES6The New JavaScript: ES6
The New JavaScript: ES6
 
enterprise-angular-v5.pdf
enterprise-angular-v5.pdfenterprise-angular-v5.pdf
enterprise-angular-v5.pdf
 
[2019] 점진적으로 프런트엔드 프레임워크 교체하기
[2019] 점진적으로 프런트엔드 프레임워크 교체하기[2019] 점진적으로 프런트엔드 프레임워크 교체하기
[2019] 점진적으로 프런트엔드 프레임워크 교체하기
 

Destacado

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 & tricksGiuseppe 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 2013SPSSTHLM
 
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 APIORCID, 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 APIRob 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 developmentJeremy Thake
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOMMark 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 HoustonKunaal Kapoor
 
Power Up with PowerApps
Power Up with PowerAppsPower Up with PowerApps
Power Up with PowerAppsBobby Chang
 
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/2010Bobby Chang
 
Architecting Microservices in .Net
Architecting Microservices in .NetArchitecting Microservices in .Net
Architecting Microservices in .NetRichard 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 GatewayAmazon Web Services
 
SharePoint Permissions Worst Practices
SharePoint Permissions Worst PracticesSharePoint Permissions Worst Practices
SharePoint Permissions Worst PracticesBobby Chang
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to BootstrapRon 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 2013Christian Buckley
 

Destacado (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 a 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 - SPTechConSPTechCon
 
Full Stack Developer
Full Stack DeveloperFull Stack Developer
Full Stack DeveloperAkbar Uddin
 
Coding 100-session-slides
Coding 100-session-slidesCoding 100-session-slides
Coding 100-session-slidesCisco DevNet
 
Web api using rest based architecture
Web api using rest based architectureWeb api using rest based architecture
Web api using rest based architectureSoham Kulkarni
 
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 SharePointDenny 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 DeveloperInnoTech
 
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 DayTechMaster Vietnam
 
Building high performance
Building high performanceBuilding high performance
Building high performanceRoy Sheinfeld
 
Austin Day of Rest - Introduction
Austin Day of Rest - IntroductionAustin Day of Rest - Introduction
Austin Day of Rest - IntroductionHandsOnWP.com
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기lanslote
 
Comsharepoint2013pdf
Comsharepoint2013pdfComsharepoint2013pdf
Comsharepoint2013pdfKamal 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
 
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 & AUSguest7c2e070
 
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 a 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
 

Último

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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
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
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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 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
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
🐬 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
 
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
 

Último (20)

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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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...
 
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
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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 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
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 

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