Export (0) Print
Expand All

BCS REST API reference for SharePoint 2013

SharePoint 2013

Updated: March 5, 2013

Class libraries and references

Contains reference information for constructing Representational State Transfer (REST) URLs to access and manipulate external data sources using Business Connectivity Services (BCS) in SharePoint 2013.

The REST interface provided by SharePoint 2013 enables you to access most SharePoint 2013 resources through specially constructed URLs. Business Connectivity Services (BCS) uses this architecture to provide access to external data.

You can access external data by constructing URLs just as you would to access standard list items.

Note Note

Access to entities through the BDC directly is not provided. To work with external data, you must create an external list and use the REST URLs to access the list items contained in the external list.

The supported HTTP verbs for working with external lists are GET, PUT, POST, and DELETE.

Unlike with normal lists, you can’t create an external list using REST. You must do that by creating a BDC model and an external list using Visual Studio 2012.

The information in Table 1 shows how to construct RESTful URLs and the corresponding client object model calls to access and manipulate data from external data sources.

Table 1. RESTful URL formats for accessing external data

URL

Description

HTTP method

http://[sharepointsite]/_api

The base of any REST request. The _api virtual directory is mapped to call into client.svc, where the client object model can be used.

GET

http://[sharepointsite]/_api/web/title

Retrieves the title of the current web.

GET

http://[sharepointsite]/_api/lists

Retrieves all lists on a site.

GET

http://[sharepointsite]/_api/lists/getbytitle('listname')

Retrieves the metadata for a specified list.

GET

http://[sharepointsite]/_api/lists/getbytitle('listname')/items

Retrieves the list items in a specified list.

GET

http://[sharepointsite]/_api/lists/getbytitle('listname')?select=Title

Retrieves the title of a specific list.

GET

In order to limit the amount of data returned, or make it more relevant to the user, you can use the filter operations found in Table 2.

Table 2. Operators for filtering data

Operator

EQ

Equals

Note Note

When you use EQ to filter, the filter criteria are passed to the external system where the filtering happens on the server.

GT

Greater Than

Note Note

When you use the GT operator, only client-side filtering is executed.

For example: web/lists/getByTitle('ListName')/Items?$select=Title&$filter=AverageRating gt 3 returns all titles with an average rating over 3.

Note Note

To retrieve columns that are part of an association, you must explicitly include the column in the URL using $select in the query string.

Date

Description

March 05, 2013

Modified the table of urls for accessing REST endpoints.

July 16, 2012

Initial publication

Community Additions

ADD
Show:
© 2014 Microsoft