SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Virtualisation.pptx
Virtualisation.pptxVirtualisation.pptx
Virtualisation.pptxISaf3
 
Master Real-Time Streams With Neo4j and Apache Kafka
Master Real-Time Streams With Neo4j and Apache KafkaMaster Real-Time Streams With Neo4j and Apache Kafka
Master Real-Time Streams With Neo4j and Apache KafkaNeo4j
 
Django Framework and Application Structure
Django Framework and Application StructureDjango Framework and Application Structure
Django Framework and Application StructureSEONGTAEK OH
 
Introduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate WorkshopIntroduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate WorkshopAjeet Singh Raina
 
Creating_scheduled_reports_with_Zabbix.pdf
Creating_scheduled_reports_with_Zabbix.pdfCreating_scheduled_reports_with_Zabbix.pdf
Creating_scheduled_reports_with_Zabbix.pdfITDispendik
 
Aaron Mildenstein - Using Logstash with Zabbix
Aaron Mildenstein - Using Logstash with ZabbixAaron Mildenstein - Using Logstash with Zabbix
Aaron Mildenstein - Using Logstash with ZabbixZabbix
 
Introduction to Testcontainers
Introduction to TestcontainersIntroduction to Testcontainers
Introduction to TestcontainersVMware Tanzu
 
AWS VPC by hellocloud.io
AWS VPC by hellocloud.ioAWS VPC by hellocloud.io
AWS VPC by hellocloud.ioHello Cloud
 
Moussasambe projet de securite zabbix
Moussasambe projet de securite zabbixMoussasambe projet de securite zabbix
Moussasambe projet de securite zabbixmoussa sambe
 
Rapport Splunk.pdf
Rapport Splunk.pdfRapport Splunk.pdf
Rapport Splunk.pdfHichemKhalfi
 
Introduction au développement Web
Introduction au développement Web Introduction au développement Web
Introduction au développement Web Romain Willmann
 
Pfe book insodev 2022 vf
Pfe book insodev 2022 vfPfe book insodev 2022 vf
Pfe book insodev 2022 vfSarra Sassi
 

Was ist angesagt? (20)

Virtualisation.pptx
Virtualisation.pptxVirtualisation.pptx
Virtualisation.pptx
 
Master Real-Time Streams With Neo4j and Apache Kafka
Master Real-Time Streams With Neo4j and Apache KafkaMaster Real-Time Streams With Neo4j and Apache Kafka
Master Real-Time Streams With Neo4j and Apache Kafka
 
Django Framework and Application Structure
Django Framework and Application StructureDjango Framework and Application Structure
Django Framework and Application Structure
 
Introduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate WorkshopIntroduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate Workshop
 
Présentation de PHP
Présentation de PHPPrésentation de PHP
Présentation de PHP
 
Creating_scheduled_reports_with_Zabbix.pdf
Creating_scheduled_reports_with_Zabbix.pdfCreating_scheduled_reports_with_Zabbix.pdf
Creating_scheduled_reports_with_Zabbix.pdf
 
HAProxy
HAProxy HAProxy
HAProxy
 
Docker compose
Docker composeDocker compose
Docker compose
 
MongoDB.pptx
MongoDB.pptxMongoDB.pptx
MongoDB.pptx
 
Aaron Mildenstein - Using Logstash with Zabbix
Aaron Mildenstein - Using Logstash with ZabbixAaron Mildenstein - Using Logstash with Zabbix
Aaron Mildenstein - Using Logstash with Zabbix
 
Introduction to Testcontainers
Introduction to TestcontainersIntroduction to Testcontainers
Introduction to Testcontainers
 
Angular introduction students
Angular introduction studentsAngular introduction students
Angular introduction students
 
AWS VPC by hellocloud.io
AWS VPC by hellocloud.ioAWS VPC by hellocloud.io
AWS VPC by hellocloud.io
 
Moussasambe projet de securite zabbix
Moussasambe projet de securite zabbixMoussasambe projet de securite zabbix
Moussasambe projet de securite zabbix
 
Rapport Splunk.pdf
Rapport Splunk.pdfRapport Splunk.pdf
Rapport Splunk.pdf
 
Sécurité des Applications Web avec Json Web Token (JWT)
Sécurité des Applications Web avec Json Web Token (JWT)Sécurité des Applications Web avec Json Web Token (JWT)
Sécurité des Applications Web avec Json Web Token (JWT)
 
Introduction au développement Web
Introduction au développement Web Introduction au développement Web
Introduction au développement Web
 
Pfe book insodev 2022 vf
Pfe book insodev 2022 vfPfe book insodev 2022 vf
Pfe book insodev 2022 vf
 
Intro To Docker
Intro To DockerIntro To Docker
Intro To Docker
 
Introduction à Angular
Introduction à AngularIntroduction à Angular
Introduction à Angular
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 

Kürzlich hochgeladen (20)

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 

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