SlideShare a Scribd company logo
Get Some REST: SharePoint 2013 REST API's
Eric Shupps
SharePoint Server MVP
Sponsored by:

Real-time application monitoring, event
management, and operational health
metrics for Microsoft SharePoint
Reduce troubleshooting time by up to 30%
Increase efficiency and improve user satisfaction
Avoid downtime and costly outages
Meet or exceed service level agreements
Maximize investment in current infrastructure

Visit us on the web at www.binarywave.com
About Me

The
SharePoint
Cowboy

Eric Shupps

CKS:DEV

Patterns
&
Practices

www.sharepointcowboy.com

eshupps@binarywave.com

facebook.com/sharepointcowboy

@eshupps
Agenda
Introduction

Endpoints

Basic
Operations

Advanced
Methods

JavaScript

Windows 8
INTRODUCTION
Background
HTTP-based web service architecture that
uses nouns and verbs to define operations
Noun: “Items”
Verbs: GET, POST, PUT, DELETE
OData provides metadata, object typing
and query semantics for underlying data
structure (WCF data services)
/items(0)
Client Object Model service (client.svc)
processes queries, interacts with server OM,
returns formatted response (JSON, XML)
/items/GetByTitle(‘foo’)
Implementation

READ

UPDATE
DELETE

GET

PUT, MERGE, DELETE

Client.svc

CREATE

POST

Server
OM

Content
DB
Structure

http://contoso/_api/items/GetById(1)?$select=Title,ID

Location

Service

Resource Path

Query Options
Security
Local

Remote

Cross
Domain

Current
Context

OAuth

Request
Executor

Request
Digest

Access
Token

SP.WebProxy

Context
Info

Cross
Domain

HTTP
WebRequest
Gotchas
 OData

Spec != SharePoint REST
 No request batching
 Must specify “odata=verbose” in header
 Default response format is ATOM
 Use CSOM notation when accessing
static methods and properties
 Some requests may not return default
values due to processing overhead
ENDPOINTS
SharePoint 2013 REST Endpoints
Site

Web

Publishing

User
Profiles

Search

Taxonomy

Webs

Lists

Pages

Users

Query Results

Managed
Metadata

Features

Items

Variations

Profiles

Suggestions

Navigation

Activity

Event
Receivers
Metadata

You
Must
Be
Joking!
BASIC OPERATIONS
Sites
Get Feature
http://<site collection>/<site>/_api/sites/features/GetById(guid’<value>’)

View Event Receivers
http://<site collection>/<site>/_api/sites/eventreceivers

Create a Site
http://<site collection>/<site>/_api/web/webinfos/add
{ 'd' :{
'parameters': {
'__metadata': {'type': 'SP.WebInfoCreationInformation' },
'Url': 'RestSubWeb',
'Title': 'RestSubWeb',
'Description': 'rest created web',
'Language':1033,
'WebTemplate':'sts',
'UseUniquePermissions':false}
}}
Lists
Get All Lists
http://<site collection>/<site>/_api/lists

Get List
http://<site collection>/<site>/_api/lists/GetByTitle(‘Shared Documents’)

Get List Item
http://<site collection>/<site>/_api/lists/GetByTitle(‘Shared Documents’)/items/GetById(0)

Get List Item with Specific Properties
http://<site collection>/<site>/_api/lists/GetByTitle(‘Shared Documents’)/items/
GetById(1)?$select=Title,ID
Search
Simple Term
http://<site collection>/<site>/_api/search/query?queryText=‘Value’

Item Property
http://<site collection>/<site>/_api/search/query?queryText=‘PreferredName:Robert Smith’

Suggestions
http://<site collection>/<site>/_api/search/suggest?queryText=‘quarterly sales’
Social
Get Followed Users
http://<site collection>/<site>/_api/social.following/followed

Get Followed Documents
http://<siteCollection>/<site>/_api/social.following/my/followeddocumentsuri

Get Suggestions
http://<site collection>/<site>/_api/sp.userprofiles.peoplemanager/getmysuggestions

Get Followers
http://<siteCollection>/<site>/_api/sp.userprofiles.peoplemanager/
getpeoplefollowedby(accountName=@v)?@v='domainuser'
ADVANCED METHODS
Queries
HTML Values
http://<site>/_api/Web/Lists(guid’<value>′)/Items(1)/FieldValuesAsHtml

Get Permissions
http://<site>/_api/web/lists/getbytitle(‘Products’)/items()/?$select=Title,
Price,effectivebasepermissions

Join
http://<site>/_api/web/lists/getbytitle('Products')/items()?$select=Title,
Price,Supplier_/Title&$expand=Supplier_/Title
Sorting & Filtering
Filter with Comparison
http://<site>/_api/web/lists/getbytitle(‘Products’)/items/?$filter=Price gt 30000

Join with Filter
http://<site>/_api/web/lists/getbytitle(‘Products’)/items()?
$select=Title,Price,Supplier_/Title&$expand=Supplier_/Title&$filter=Supplier_/Title eq ‘Acme’

Top ‘N’ Results
http://<site collection>/<site>/_api/web/lists('<guid>')/items$top=10
CRUD Operations
Create a List Item
url: http://site url/_api/web/lists/GetByTitle(‘Test')/items
method: POST
body: { '__metadata': { 'type': 'SP.Data.TestListItem' }, 'Title': 'Test'}
headers:
Authorization = "Bearer " + accessToken
X-RequestDigest = form digest value
accept: "application/json;odata=verbose"
content-type: "application/json;odata=verbose"
content-length:1024

Edit a List Item
url: http://site url/_api/web/lists/GetByTitle(‘Test')/items(item id)
method: POST
body: { '__metadata': { 'type': 'SP.Data.TestListItem' }, 'Title': 'TestUpdated'}
headers:
Authorization = "Bearer " + accessToken
X-RequestDigest = form digest value
“IF-MATCH”: etag or “*”
“X-HTTP-Method”:”MERGE”,
accept: "application/json;odata=verbose"
content-type: "application/json;odata=verbose"
content-length:1024
Form Digest
 Used

to prevent replay attacks
 Updates will fail without digest value
 Local
 $("#__REQUESTDIGEST").val()
 Remote

 POST to /_api/contextinfo
JAVASCRIPT
Operations
 Async

GET/POST operations using AJAX

library
 Cross-Domain Library
 SP.RequestExecutor
 Remote

Apps: SP.AppContextSite with

@target
 JSON response
 accept: "application/json;odata=verbose"
Authorization
 Remote

 Use CSOM to set context
 Sites/Webs/Lists
– Handled by appweb not hostweb

 Pass token in request
– RequestExecutor

 Local

 Use current context
Retrieving SharePoint list data with jQuery, REST and AJAX

PROVIDER HOSTED APP
WINDOWS 8
Operations
 XAML

 List items with specific fields
 Async
– HTTPClient, HTTPClientHandler

 ATOM
 LINQ
Authorization
 Domain

Credentials
 Permissions
 Enterprise Authentication
 Private Networks
Uploading Documents to SharePoint using REST

WINDOWS 8 APP
Sponsored by:

Real-time application monitoring, event
management, and operational health
metrics for Microsoft SharePoint
Reduce troubleshooting time by up to 30%
Increase efficiency and improve user satisfaction
Avoid downtime and costly outages
Meet or exceed service level agreements
Maximize investment in current infrastructure

Visit us on the web at www.binarywave.com
Resources
Description

Link

Programming Using the SharePoint 2013 REST Service

http://bit.ly/TUwC9N

OData URI Conventions

http://bit.ly/Ytgdz4

Using the SharePoint 2013 REST Service

http://bit.ly/YPHif5

SharePoint 2013 Search REST API

http://bit.ly/ZqzOuM

Configuring SharePoint 2013 Search REST for Anonymous Users

http://bit.ly/152vFoy

SharePoint 2013 REST TypeScript Library

http://sprestts.codeplex.com

More Related Content

What's hot (20)

PDF
Suspicious Outbound Traffic Monitoring Security Use Case Guide
Protect724manoj
 
PPTX
Vapt( vulnerabilty and penetration testing ) services
Akshay Kurhade
 
PDF
Web App Security Presentation by Ryan Holland - 05-31-2017
TriNimbus
 
PPTX
Security misconfiguration
Micho Hayek
 
PDF
Secure coding presentation Oct 3 2020
Moataz Kamel
 
PDF
Siber Güvenlikte Yapay Zeka Uygulamaları - Webinar
BGA Cyber Security
 
PPT
Information Security Principles - Access Control
idingolay
 
PPTX
Introduction To Vulnerability Assessment & Penetration Testing
Raghav Bisht
 
PDF
Application Security - Your Success Depends on it
WSO2
 
PDF
Scalable threat modelling with risk patterns
Stephen de Vries
 
PPTX
7 Steps to Threat Modeling
Danny Wong
 
PPTX
Web Application Security 101
Jannis Kirschner
 
PDF
System Hardening Recommendations_FINAL
Martin Evans
 
PDF
Vulnerability and Patch Management
n|u - The Open Security Community
 
PPTX
Domain 2 - Asset Security
Maganathin Veeraragaloo
 
PPTX
Security architecture, engineering and operations
Piyush Jain
 
PPTX
Secure Coding 101 - OWASP University of Ottawa Workshop
Paul Ionescu
 
PDF
Database security
Murchana Borah
 
PPTX
Application Security Architecture and Threat Modelling
Priyanka Aash
 
Suspicious Outbound Traffic Monitoring Security Use Case Guide
Protect724manoj
 
Vapt( vulnerabilty and penetration testing ) services
Akshay Kurhade
 
Web App Security Presentation by Ryan Holland - 05-31-2017
TriNimbus
 
Security misconfiguration
Micho Hayek
 
Secure coding presentation Oct 3 2020
Moataz Kamel
 
Siber Güvenlikte Yapay Zeka Uygulamaları - Webinar
BGA Cyber Security
 
Information Security Principles - Access Control
idingolay
 
Introduction To Vulnerability Assessment & Penetration Testing
Raghav Bisht
 
Application Security - Your Success Depends on it
WSO2
 
Scalable threat modelling with risk patterns
Stephen de Vries
 
7 Steps to Threat Modeling
Danny Wong
 
Web Application Security 101
Jannis Kirschner
 
System Hardening Recommendations_FINAL
Martin Evans
 
Vulnerability and Patch Management
n|u - The Open Security Community
 
Domain 2 - Asset Security
Maganathin Veeraragaloo
 
Security architecture, engineering and operations
Piyush Jain
 
Secure Coding 101 - OWASP University of Ottawa Workshop
Paul Ionescu
 
Database security
Murchana Borah
 
Application Security Architecture and Threat Modelling
Priyanka Aash
 

Viewers also liked (20)

PPTX
Understanding the REST API of SharePoint 2013
SPSSTHLM
 
PPTX
SharePoint REST vs CSOM
Mark Rackley
 
PPTX
Curso SharePoint 2013 overview
Vladimir Medina
 
PPTX
Get Some Rest - Taking Advantage of the SharePoint 2013 REST API
Eric Shupps
 
PDF
Fy10 us budget_spending
Stephen Castellari
 
PDF
ITCamp 2013 - Peter Leeson - Intelligent Evolution
ITCamp
 
PPT
Tutorial Brainshark 4
Fernanda Gonzalez
 
PPTX
SharePoint Online Collaboration Options
Roman Nedzelsky
 
PDF
City square presentation
fishball5
 
PDF
Software Licensing for SaaS Applications
InishTech
 
PDF
Azure licensing (not) so easy - Laurynas Dovydaitis
ITCamp
 
PDF
Federal it transformation plans
Stephen Castellari
 
PDF
Certificate - Azure Fundamentals
Claude LACHAPELLE
 
PPTX
Pricing for profit
Azure Group
 
DOCX
Articulo
Karo Velasquez
 
PPTX
Automotive Industry Research: An Analysis of the Key Insights from the VFACTS...
James Organ
 
PPT
Advanced scientific visualization
Charles Flynt
 
PPTX
SharePoint Online v Onprem - presented by Concurrency, Inc
Concurrency, Inc.
 
PDF
Azure Cloud Dev Camp - Introduction
giventocode
 
Understanding the REST API of SharePoint 2013
SPSSTHLM
 
SharePoint REST vs CSOM
Mark Rackley
 
Curso SharePoint 2013 overview
Vladimir Medina
 
Get Some Rest - Taking Advantage of the SharePoint 2013 REST API
Eric Shupps
 
Fy10 us budget_spending
Stephen Castellari
 
ITCamp 2013 - Peter Leeson - Intelligent Evolution
ITCamp
 
Tutorial Brainshark 4
Fernanda Gonzalez
 
SharePoint Online Collaboration Options
Roman Nedzelsky
 
City square presentation
fishball5
 
Software Licensing for SaaS Applications
InishTech
 
Azure licensing (not) so easy - Laurynas Dovydaitis
ITCamp
 
Federal it transformation plans
Stephen Castellari
 
Certificate - Azure Fundamentals
Claude LACHAPELLE
 
Pricing for profit
Azure Group
 
Articulo
Karo Velasquez
 
Automotive Industry Research: An Analysis of the Key Insights from the VFACTS...
James Organ
 
Advanced scientific visualization
Charles Flynt
 
SharePoint Online v Onprem - presented by Concurrency, Inc
Concurrency, Inc.
 
Azure Cloud Dev Camp - Introduction
giventocode
 
Ad

Similar to Taking Advantage of the SharePoint 2013 REST API (20)

DOCX
SharePoint 2013 REST API & Remote Authentication
Adil Ansari
 
PPTX
Introduction to SharePoint 2013 REST API
QUONTRASOLUTIONS
 
PPTX
Are you getting Sleepy. REST in SharePoint Apps
Liam Cleary [MVP]
 
DOCX
Working With Sharepoint 2013 Apps Development
Pankaj Srivastava
 
PPTX
Introduction to the SharePoint 2013 REST API
Sparkhound Inc.
 
PDF
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
Eric Shupps
 
PPT
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
Kiril Iliev
 
PPTX
Introduction to the SharePoint Client Object Model and REST API
Rob Windsor
 
PPTX
SharePoint 2013 REST and CSOM
Usama Wahab Khan Cloud, Data and AI
 
PPTX
SharePoint 2013 REST APIs
Giuseppe Marchi
 
PPTX
Understanding and programming the SharePoint REST API
Chris Beckett
 
PDF
Building windows8 modern app for sp2013
Vinh Nguyen
 
PDF
SharePoint goes Microsoft Graph
Markus Moeller
 
PPTX
APIs, APIs Everywhere!
BIWUG
 
PPTX
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
Sébastien Levert
 
PPTX
2013 - Back to the Future with Client/Server Development
Chris O'Connor
 
PPTX
SharePoint for the .NET Developer
John Calvert
 
PPTX
Share point development 101
Becky Bertram
 
PPTX
SharePoint Conference 2018 - APIs, APIs everywhere!
Sébastien Levert
 
PPTX
SharePoint 2013 APIs
John Calvert
 
SharePoint 2013 REST API & Remote Authentication
Adil Ansari
 
Introduction to SharePoint 2013 REST API
QUONTRASOLUTIONS
 
Are you getting Sleepy. REST in SharePoint Apps
Liam Cleary [MVP]
 
Working With Sharepoint 2013 Apps Development
Pankaj Srivastava
 
Introduction to the SharePoint 2013 REST API
Sparkhound Inc.
 
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
Eric Shupps
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
Kiril Iliev
 
Introduction to the SharePoint Client Object Model and REST API
Rob Windsor
 
SharePoint 2013 REST and CSOM
Usama Wahab Khan Cloud, Data and AI
 
SharePoint 2013 REST APIs
Giuseppe Marchi
 
Understanding and programming the SharePoint REST API
Chris Beckett
 
Building windows8 modern app for sp2013
Vinh Nguyen
 
SharePoint goes Microsoft Graph
Markus Moeller
 
APIs, APIs Everywhere!
BIWUG
 
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
Sébastien Levert
 
2013 - Back to the Future with Client/Server Development
Chris O'Connor
 
SharePoint for the .NET Developer
John Calvert
 
Share point development 101
Becky Bertram
 
SharePoint Conference 2018 - APIs, APIs everywhere!
Sébastien Levert
 
SharePoint 2013 APIs
John Calvert
 
Ad

More from Eric Shupps (20)

PPTX
Microsoft Ignite 2022 - Scaling, Securing, Managing, and Publishing Power Pla...
Eric Shupps
 
PPTX
Scaling, Securing, Managing, and Publishing Power Platform Custom Connectors....
Eric Shupps
 
PDF
A Beginners Guide to Custom Connectors for Power Apps and Power Automate
Eric Shupps
 
PDF
App to AppExchange - A Journey from Idea to Market for Salesforce Developers
Eric Shupps
 
PPTX
Beginners Guide to Custom Connectors for Power Apps and Power Automate
Eric Shupps
 
PPTX
OSW06 - A Real World Guide to Building Highly Available Fault Tolerant ShareP...
Eric Shupps
 
PPTX
OSH01 - Developing SharePoint Framework Solutions for the Enterprise
Eric Shupps
 
PPTX
Mastering Modern Authentication and Authorization Techniques for SharePoint, ...
Eric Shupps
 
PPTX
Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
Eric Shupps
 
PPTX
Developing SharePoint Framework Solutions for the Enterprise - SEF 2019
Eric Shupps
 
PPTX
SharePoint and Office 365 Development Workshop
Eric Shupps
 
PPTX
ECS 2018: Introduction to Azure Web Applications
Eric Shupps
 
POTX
SharePoint 24x7x365 Architecting for High Availability, Fault Tolerance and D...
Eric Shupps
 
PPTX
Overcoming Gender Imbalance in the Technical Field
Eric Shupps
 
POTX
Mastering Modern Authentication and Authorization for SharePoint and Office A...
Eric Shupps
 
PPTX
Enterprise Content Management Solutions in SharePoint and Office 365
Eric Shupps
 
PPTX
Introduction to the Office Dev PnP Core Libraries
Eric Shupps
 
PPTX
SharePoint and Office Development Workshop
Eric Shupps
 
PPTX
From Zero to Hero: A Real World Guide to Building High Availability SharePoin...
Eric Shupps
 
PPTX
SharePoint and Office 365 Performance Best Practices
Eric Shupps
 
Microsoft Ignite 2022 - Scaling, Securing, Managing, and Publishing Power Pla...
Eric Shupps
 
Scaling, Securing, Managing, and Publishing Power Platform Custom Connectors....
Eric Shupps
 
A Beginners Guide to Custom Connectors for Power Apps and Power Automate
Eric Shupps
 
App to AppExchange - A Journey from Idea to Market for Salesforce Developers
Eric Shupps
 
Beginners Guide to Custom Connectors for Power Apps and Power Automate
Eric Shupps
 
OSW06 - A Real World Guide to Building Highly Available Fault Tolerant ShareP...
Eric Shupps
 
OSH01 - Developing SharePoint Framework Solutions for the Enterprise
Eric Shupps
 
Mastering Modern Authentication and Authorization Techniques for SharePoint, ...
Eric Shupps
 
Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
Eric Shupps
 
Developing SharePoint Framework Solutions for the Enterprise - SEF 2019
Eric Shupps
 
SharePoint and Office 365 Development Workshop
Eric Shupps
 
ECS 2018: Introduction to Azure Web Applications
Eric Shupps
 
SharePoint 24x7x365 Architecting for High Availability, Fault Tolerance and D...
Eric Shupps
 
Overcoming Gender Imbalance in the Technical Field
Eric Shupps
 
Mastering Modern Authentication and Authorization for SharePoint and Office A...
Eric Shupps
 
Enterprise Content Management Solutions in SharePoint and Office 365
Eric Shupps
 
Introduction to the Office Dev PnP Core Libraries
Eric Shupps
 
SharePoint and Office Development Workshop
Eric Shupps
 
From Zero to Hero: A Real World Guide to Building High Availability SharePoin...
Eric Shupps
 
SharePoint and Office 365 Performance Best Practices
Eric Shupps
 

Recently uploaded (20)

PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Python basic programing language for automation
DanialHabibi2
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
July Patch Tuesday
Ivanti
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 

Taking Advantage of the SharePoint 2013 REST API