close

Desktop Endpoint Security

SharePoint Search API

SharePoint Enterprise Search capabilities are exposed for use from SharePoint Apps and external Applications through various interfaces. While some of these APIs needs SharePoint context, REST based APIs on the other hand can be accessed directly.

Following are the different API options available.

API name Class library or schema and path .NET client object model (CSOM) Microsoft.SharePoint.Client.Search.dll %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\ISAPI Silverlight CSOM Microsoft.SharePoint.Client.Search.Silverlight.dll %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\LAYOUTS\ClientBin JavaScript CSOM SP.search.js %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\LAYOUTS Representational State Transfer (REST) service endpoints Server object model Microsoft.Office.Server.Search.dll %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\ISAPI

If .NET client object model (CSOM) or JavaScript CSOM are used on the client, the server would require to have SharePoint Server 2013 Client Components SDK installed. Which can be downloaded at

API selection matrix

REST

Search in SharePoint 2013 includes a Search REST service you can use to add search functionality to your client and mobile applications by using any technology that supports REST web requests. You can use the Search REST service to submit Keyword Query Language (KQL) or FAST Query Language (FQL) queries in your apps for SharePoint, remote client applications, mobile applications, and other applications.

The Search REST service supports both HTTP POST and HTTP GET requests.

GET requests

Construct the URI for query GET requests to the Search REST service as follows:

/_api/search/query

For GET requests, you specify the query parameters in the URL. You can construct the GET request URL in two ways:

POST requests

You construct the URI for query POST requests to the Search REST service as follows:

/ _api / Search / postquery

References

Query

When you make a call to the Search REST service, you specify query parameters with the request. Search in SharePoint 2013 uses these query parameters to construct the search query. With a GET request, you specify the query parameters in the URL. For POST requests, you pass the query parameters in the body in JavaScript Object Notation (JSON) format.

Sample GET request:

Sample POST request:

JSON

{ ‘__metadata’ : {‘type’ : ‘Microsoft.Office.Server.Search.REST.SearchRequest’}, ‘Querytext’ : ‘sharepoint’ }

Suggestions

The Search REST service includes a Suggest endpoint you can use in any technology that supports REST web requests to retrieve query suggestions that the search system generates for a query from client or mobile applications.

Note: The Search REST service doesn’t support anonymous requests to the Suggest endpoint.


endpoint security definition     endpoint security cisco

TAGS

CATEGORIES