- What exactly do you want to read? Is it SharePoint list information?Divya Sharma– Divya Sharma2023-02-22 05:09:55 +00:00Commented Feb 22, 2023 at 5:09
- we want to read entire page using rest or any using any other way... please helpuser107102– user1071022023-02-22 05:32:30 +00:00Commented Feb 22, 2023 at 5:32
1 Answer
You can use SharePoint REST API in your client side application to read data from SharePoint list.
You have to use REST endpoint in below format:
https://{site_url}/_api/web/lists/GetByTitle('Employee List')/items Documentation: Working with lists and list items with REST
Also, check this article Get All Items in SharePoint using REST API. It has links to similar examples to read items using JSOM, CSOM and PowerShell which you can refer and use as per your requirements.
Update:
If you want to fetch site page contents, use endpoint in this format:
https://contoso.sharepoint.com/sites/SiteName/_api/web/lists/getbytitle('Site Pages')/items(1)?$select=Title,CanvasContent1 Replace 1 with the item ID of your site page from site pages library.
You can get the item ID of your site from site pages library.
Go to site pages library using URL like:
https://contoso.sharepoint.com/sites/SiteName/SitePagesClick on Add Column and then Show or hide columns:
Select checkbox next to ID, click Apply:
You will see item ID in site pages library view like:
OR
You can get the page content using page name as well using API like:
https://contoso.sharepoint.com/sites/SiteName/_api/web/lists/getbytitle('Site Pages')/items?$select=Title,FileLeafRef,CanvasContent1&$filter=FileLeafRef eq 'Employee.aspx' - employee page details i want to readuser107102– user1071022023-02-22 06:37:40 +00:00Commented Feb 22, 2023 at 6:37
- check updated answer.Ganesh Sanap - MVP– Ganesh Sanap - MVP2023-02-22 06:46:05 +00:00Commented Feb 22, 2023 at 6:46
- site page url not working. I have added page screenshot above please see and help how i get site ID.user107102– user1071022023-02-22 09:14:50 +00:00Commented Feb 22, 2023 at 9:14
- Check updated answer. You can either use ID approach or get page content using page name as well. I have added both endpoints.Ganesh Sanap - MVP– Ganesh Sanap - MVP2023-02-22 09:26:38 +00:00Commented Feb 22, 2023 at 9:26
- 1Thanks a lot for helping me.user107102– user1071022023-02-22 09:45:48 +00:00Commented Feb 22, 2023 at 9:45




