Searching for SharePoint Items in SharePoint Lists

In this article

    You can search for SharePoint items in the specified SharePoint list.

    Request

    POST https://<hostname>:4443/v5/RestoreSessions/{restoreSessionId}/Organization/Sites/{siteId}/Lists/{listId}/action

    Request Headers

    The request header must contain an authorization token of the current session.

    Request Parameters

    The following parameters must be specified in the URL of the request:

    Parameter

    Type

    Description

    restoreSessionId

    string

    Specifies the identification number of the restore session. For more information on how to get this parameter, see Getting Restore Sessions.

    siteId

    string

    Specifies the identification number of the SharePoint site. For more information on how to get this parameter, see Getting Organization SharePoint Sites.

    listId

    string

    Specifies the identification number of the SharePoint list. For more information on how to get this parameter, see Getting SharePoint Lists.

    Request Body

    The request body must contain the search action property:

    Property

    Type

    Description

    query

    string

    Specifies query parameters used to search for SharePont items. For more information, see Query Parameters.

    Query Parameters

    The following table lists examples of parameters that you can use in the query string to search for Microsoft SharePoint documents.

    For the complete list of supported query parameters, see Appendix A. Item Search Parameters.

    Parameter

    Type

    Description

    filename

    string

    Specifies the name (or part of the name) of the item that you want to find.

    size

    string

    Specifies the size of the item that you want to find.

    subject

    string

    Specifies the subject of the item that you want to find.

    title

    string

    Specifies the title of the item that you want to find.

    Request Example

    Request:

    POST https://delta.tech.local:4443/v5/RestoreSessions/38575aaa-ada7-42a3-a0ee-5469dc8b261b/Organization/Sites/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9/Lists/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9c48733d1-a21a-43ed-be5f-f6f86ac23679/action

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Request Body:

    {

      "search":{

         "query": "filename:report"

      }

    }

     

    Searching for SharePoint Items in SharePoint Lists Note

    If a value for a query parameter contains a space, provide the value in the quotation marks (""). Use the backslash (\) symbol as an escape character before these quotation marks. For example: "query": "filename: \"Social Features\"".

    Response

    The server returns the following response to the client.

    Response Codes

    A successfully completed operation returns a response code 200 OK.

    Response Headers

    The response to this request contains the following headers. The response may also include additional standard HTTPS headers.

    Header

    Description

    Content-length

    The length of the response body.

    Content-type

    The media type and syntax of the response body message: application/json; charset=utf-8

    Response Body

    The response contains the following information:

    Property

    Type

    Description

    offset

    integer

    Shows the offset value.

    limit

    integer

    Shows the limit of records to be displayed on the page.

    results

    Results Object

    Contains the Results object.

    Results Object

    Property

    Type

    Description

    title

    string

    Shows the title of the item.

    version

    string

    Shows the version of the item.

    id

    string

    Shows the ID of the item.

    name

    string

    Shows the name of the item.

    createdBy

    string

    Shows the name of the user who created the item.

    creationTime

    datetime

    Shows the date and time when the item was created.

    modifiedBy

    string

    Shows the name of the user who performed the latest modification of the item.

    modificationTime

    datetime

    Shows the date and time of the latest modification of the item.

    _links

    Dictionary of string [key] and Object [value]

    Links to related resources (navigation property).

    Response Example

    Response:

    200 OK

     

    Response Body:

    {

     "offset": 0,

     "limit": 30,

     "results": [

       {

         "title": "report",

         "version": "1.0",

         "id": "7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9c48733d1-a21a-43ed-be5f-f6f86ac23679efe66513-9947-4e6b-bc4d-e44c54453305",

         "name": "report",

         "createdBy": "System Account",

         "creationTime": "2018-02-08T15:44:11",

         "modifiedBy": "System Account",

         "modificationTime": "2018-02-08T15:44:11",

         "_links": {

           "self": {

             "href": "https://delta.tech.local:4443/v5/RestoreSessions/38575aaa-ada7-42a3-a0ee-5469dc8b261b/organization/sites/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9/items/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9c48733d1-a21a-43ed-be5f-f6f86ac23679efe66513-9947-4e6b-bc4d-e44c54453305"

           },

           "list": {

             "href": "https://delta.tech.local:4443/v5/RestoreSessions/38575aaa-ada7-42a3-a0ee-5469dc8b261b/organization/sites/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9/lists/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9c48733d1-a21a-43ed-be5f-f6f86ac23679"

           },

           "attachments": {

             "href": "https://delta.tech.local:4443/v5/RestoreSessions/38575aaa-ada7-42a3-a0ee-5469dc8b261b/organization/sites/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9/items/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9c48733d1-a21a-43ed-be5f-f6f86ac23679efe66513-9947-4e6b-bc4d-e44c54453305/attachments"

           }

         }

       }

     ],

     "_links": {

       "self": {

         "href": "https://delta.tech.local:4443/v5/RestoreSessions/38575aaa-ada7-42a3-a0ee-5469dc8b261b/Organization/Sites/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9/Lists/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9c48733d1-a21a-43ed-be5f-f6f86ac23679/action?offset=0&limit=30"

       }

     }

    }