Forum Discussion

bhavaM's avatar
bhavaM
Copper Contributor
Aug 10, 2023

How to get Json for a Modern Sharepoint page

Hi, Hope all are doing well.
My requirements is
1.To get a json content of a modern sharepoint page. How Can I get the json contents. Can anyone please explain me briefly.
Please help me to find my need. Thanks in advance 

  • bhavaM SharePoint Online page content is saved into a column called CanvasContent1.

     

    Try (using item ID): 

     

    https://contoso.sharepoint.com/sites/SiteName/_api/web/lists/getbytitle('Site Pages')/items(1)?$select=Title,CanvasContent1

     

    OR (using page name): 

     

    https://contoso.sharepoint.com/sites/SiteName/_api/web/lists/getbytitle('Site Pages')/items?$select=Title,FileLeafRef,CanvasContent1&$filter=FileLeafRef eq 'Employee.aspx'

     

    Similar threadHow to retrieve the whole content of a modern SharePoint site page using the SharePoint API or Microsoft Graph API 


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources