Sergiej Klimentowski
Sergiej Klimentowski

Reputation: 33

How to extract comments from SharePoint List?

Is there any way to extract somehow comments from SharePoint list?

enter image description here

Upvotes: 2

Views: 2370

Answers (2)

EchoDu_MSFT
EchoDu_MSFT

Reputation: 621

We can use REST API to retrieve comments, and manage comments.

To get all comments from a modern page, make a Get request to:

#A page which has the id "xxx"
#/_api/web/lists/GetByTitle('Site Pages')/GetItemById("xxx")/Comments
        
#For example:
/_api/web/lists/GetByTitle('Site Pages')/GetItemById(22)/Comments

enter image description here

enter image description here

Here is a similar case for your reference:

Upvotes: 1

Nikolay
Nikolay

Reputation: 12245

Yes, you should be able to Comments API to get the comments:

{webUrl}/_api/web/Lists(guid'{listId}')/GetItemById({itemId})/Comments

Check out the article here: https://www.eliostruyf.com/getting-likes-and-comments-from-modern-pages/

Upvotes: 0

Related Questions