Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Interacting with list entities

Updated on March 14, 2022

Make use of the list entity data pages to interact with your SharePoint lists directly from your Pega application. In addition to retrieving all or single lists, you can use these data pages to create, rename, and delete lists.

Retrieving all lists

When referenced, the D_SPOnlineGetAllLists data page returns information for all lists from a SharePoint site.

Data page details

Data pageData typeSharePoint APIHTTP method
D_SPOnlineGetAllListsInt-SPO-Listshttps://{site url}/_api/web/listsGET

Data page parameters

NameDescriptionRequired
SiteName Overrides the default site in SPOnlineSetings.
AuthProfileOverrides the default authentication profile in the SPOnlineSetings data transform.
SelectFieldsSpecifies the fields to retrieve.
SelectItemsSpecifies the items to retrieve. You can use this filter to return results that match a simple logical expression.

For example, in an ID eq 2 expression, ID is the field name, eq is the equality operator, and 2 is the matching value.

For more information about the supported operators and query options, refer to the SharePoint documentation.

OrderBySpecifies the sorting (by field) and order (ascending or descending) in which the results are displayed.

For example, you can display the results sorted by title in a descending order, by specifying Title Desc for this parameter.

TopNItemsRetrieves the top n (integer value) results.
SkipUntilSkips over items until the specified item is reached, and then returns the rest.

For example, if you sort by title in a descending order and configure the data page to skip titles until K, the call retrieves all titles that start with the letters from the K to A range.

Retrieving a list by ID

When referenced, the D_SPOnlineGetListById data page returns information for a single list (identified by the list ID) from a SharePoint site.

Data page details

Data pageData typeSharePoint APIHTTP method
D_SPOnlineGetListByIdInt-SPO-FilteredListshttps://{site url}/_api/web/lists(guid’ListId’)GET

Data page parameters

NameDescriptionRequired
IdSpecifies the ID value of the list to retrieve.
SiteNameOverrides the default site in SPOnlineSetings.
AuthProfileOverrides the default authentication profile in the SPOnlineSetings data transform.
SelectFieldsSpecifies the fields to retrieve.
OrderBySpecifies the sorting (by field) and order (ascending or descending) in which the results are displayed.

For example, you can display the results sorted by title in a descending order, by specifying Title Desc for this parameter.

TopNItemsRetrieves the top n (integer value) results.
SkipUntilSkips over items until the specified item is reached, and then returns the rest.

For example, if you sort by title in a descending order and configure the data page to skip titles until K, the call retrieves all titles that start with the letters from the K to A range.

Retrieving a list by title

When referenced, the D_SPOnlineGetListByTitle data page returns information for a single list (identified by the list title) from a SharePoint site.

Data page details

Data pageData typeSharePoint APIHTTP method
D_SPOnlineGetListByTitleInt-SPO-FilteredListshttps://{site url}/_api/web/lists/getbytitle(’title’)GET

Data page parameters

NameDescriptionRequired
TitleSpecifies the title value of the list to retrieve.
SiteNameOverrides the default site in SPOnlineSetings.
AuthProfileOverrides the default authentication profile in the SPOnlineSetings data transform.
SelectFieldsSpecifies the fields to retrieve.
SelectItemsSpecifies the items to retrieve. You can use this filter to return results that match a simple logical expression.

For example, in an ID eq 2 expression, ID is the field name, eq is the equality operator, and 2 is the matching value.

For more information about the supported operators and query options, refer to the SharePoint documentation.

OrderBySpecifies the sorting (by field) and order (ascending or descending) in which the results are displayed.

For example, you can display the results sorted by title in a descending order, by specifying Title Desc for this parameter.

Creating a list

When referenced, the D_SPOnlineCreateList data page posts information to create a new SharePoint list.

Data page details

Data pageData typeSharePoint APIHTTP method
D_SPOnlineCreateListInt-SPO-CreateListhttps://<site_url>/_api/web/listsPOST

Data page parameters

NameDescriptionRequired
ListTitleSpecifies the title of the list for which you want to perform this operation.
ListDescriptionSpecifies the description of the list to create.
SiteNameOverrides the default site in SPOnlineSetings.
AuthProfileOverrides the default authentication profile in the SPOnlineSetings data transform.
BaseTemplateSpecifies the template number that determines which list template type to create.

For more information about the available list template types and their corresponding ID numbers, refer to the SharePoint documentation.

Renaming a list

When referenced, the D_SPOnlineRenameList data page posts information to update the title of an existing SharePoint list.

Data page details

Data pageData typeSharePoint APIHTTP method
D_SPOnlineRenameListInt-SPO-UpdateListhttps://<site_url>/_api/web/lists(guid'ListGUID')POST

Data page parameters

NameDescriptionRequired
ListIdSpecifies the ID of the list for which you want to perform this operation.
ListNewTitleSpecifies the new title for the list that you want to update.
SiteNameOverrides the default site in SPOnlineSetings.
AuthProfileOverrides the default authentication profile in the SPOnlineSetings data transform.
IfMatchHeaderSpecifies a valid ETag value to use during the operation. The default value is *.

Deleting a list by ID

When referenced, the D_SPOnlineDeleteListById data page posts information to delete an existing SharePoint list (identified by the list ID).

Data page details

Data pageData typeSharePoint APIHTTP method
D_SPOnlineDeleteListByIdInt-SPO-DeleteListByGuidhttps://<site_url>/_api/web/lists(guid'ListGuid')POST

Data page parameters

NameDescriptionRequired
ListIdSpecifies the ID of the list for which you want to perform this operation.
SiteNameOverrides the default site in SPOnlineSetings.
AuthProfileOverrides the default authentication profile in the SPOnlineSetings data transform.
IfMatchHeaderSpecifies a valid ETag value to use during the operation. The default value is *.

Deleting a list by title

When referenced, the D_SPOnlineDeleteListByTitle data page posts information to delete an existing SharePoint list (identified by the list title).

Data page details

Data pageData typeSharePoint APIHTTP method
D_SPOnlineDeleteListByTitleInt-SPO-DeleteListByTitlehttps://<site_url>/_api/web/lists/getbytitle('ListTitle')POST

Data page parameters

NameDescriptionRequired
ListTitleSpecifies the title of the list for which you want to perform this operation.
SiteNameOverrides the default site in SPOnlineSetings.
AuthProfileOverrides the default authentication profile in the SPOnlineSetings data transform.
IfMatchHeaderSpecifies a valid ETag value to use during the operation. The default value is *.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us