Toggle menu

getListItems

Description

Retrieves the list items in a SharePoint list.

Additional details regarding the "filters" property can be found here: https://social.technet.microsoft.com/wiki/contents/articles/35796.sharepoint-2013-using-rest-api-for-selecting-filtering-sorting-and-pagination-in-sharepoint-list.aspx#Filtering_items

It should be noted that only the "eq" filter is currently provided.

Parameters

NameTypeDescription
listTitleStringThe title of the list that you want to retrieve the list items for. Exactly one of listTitle or listUrl must be specified
listUrlStringThe relative server URL of the list that you want to retrieve the list items for. Exactly one of listTitle or listUrl must be specified
authDetailsObject, optionalThe authDetails set in the worker configuration to use. If not set the request will use the default authDetails
authDetails.identifierStringThe identifier of authDetails set in the worker configuration
authDetails.authTypeStringThe authType of authDetails set in the worker configuration
filtersObject, optionalA list of key/value pairs used to filter which list items are returned. The filter matches any key/value pairs that are exactly equal to the values of a list item. The key should related to the properties defined in SharePoint for the list
topInteger, optionalThe number of list items that should be returned. If not supplied, then it returns the first 100 list items
skipUntilIdInteger, optionalIf specified, only list items after the Id specified will be returned. For example, if you specify "skipUntilId": 500, then only list items with ids higher than 500 will be returned
returnPropertiesArray <strings>, optionalAn array of strings containing the properties you want to retrieve. If this isn't specified, then all properties will be returned

Example

{
    "id": "123",
    "jsonrpc": "2.0",
    "method": "getListItems",
    "params": {
        "listTitle": "GossTest",
        "filters": {
            "Title": "GOSS Test"
        },
        "top": 2,
        "skipUntilId": 2,
        "returnProperties": ["Name", "Organisation"]
    }
}

Last modified on 27 June 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon