Introduction to the SharePoint 2013 REST API By QuontraSolutions

Views:
 
Category: Education
     
 

Presentation Description

SharePoint online training offered by Quontra Solutions with special features having Extensive Training will be in both Sharepoint Online Training and Placement. We help you in resume preparation and conducting Mock Interviews.

Comments

Presentation Transcript

Introduction to the SharePoint 2013 REST API By QuontraSolutions:

Introduction to the SharePoint 2013 REST API By QuontraSolutions Email : [email protected] Call us : 404-900-9988 WebSite : www.quontrasolutions.com

AGENDA:

AGENDA REST and ODATA Overview SharePoint 2013 REST API Demos 2

REST Introduction:

REST Introduction REST = RE presentational S tate T ransfer A simpler alternative to SOAP based on HTTP request/response pairs Client sends HTTP requests that target specific resources using unique URIs 3

What is OData?:

What is OData? Odata is a standardized REST API for Data Access ODATA API maps CRUD operations to HTTP verbs http://www.odata.org 4

HTTP Methods:

HTTP Methods GET Returns an item or array of items POST Creates a new item PUT Updates an item (replaces all fields with default values) PATCH or MERGE Updates an item in place (existing values are retained) DELETE Deletes an item 5

OData URIs:

OData URIs URI has three parts Service root URI Resource path Query string options 6 Service Root URI Resource Path to a SharePoint Object Query String Options

OData Query Option Parameters:

OData Query Option Parameters $select Specifies which columns to retrieve $filter Selecting what items to retrieve $orderby Sorting items $expand Retrieve results that are usually deferred $top Select how many items to return $skip Selecting which row to start at 7

DEMO :

DEMO 8

Critical Tools:

Critical Tools Fiddler Core jQuery library Browser developer tools Advanced REST Client (Chrome App) Postman (Chrome App) 9

Request Headers:

Request Headers Accept what type of data you want to receive Content-type What type of data you are sending in the request body X-HTTP-Method Which operation to perform X-Request Digest Encrypted security value required for updates IF-MATCH Passes Etag value to control optimistic concurrency 10

AJAX Calls:

AJAX Calls $.ajax() function is part of the core jQuery library URI end point Accept header: application/ json;odata =verbose 11

Request Digest:

Request Digest Provides security mechanism to protect against replay attacks SharePoint pages has element with ID __REQUESTDIGEST Passed in request by using X- RequestDigest header <site url>/_api/ contextinfo 12

Creating / Updating :

Creating / Updating You must include item type metadata for inserts & updates All write operations must pass valid request digest value 13

List Item Type Metadata:

List Item Type Metadata Each SharePoint list has a unique type for its list items String based type value must be passed will all inserts and updates 14

Creating list items:

Creating list items 15

Delete list items:

Delete list items 16

Update List Items:

Update List Items 17

Current REST Issues:

Current REST Issues REST API does have support for Managed Metadata Workflows Lacks batching support * 18

Thank You!:

Thank You! 19

authorStream Live Help