0

I know that the content of a SharePoint page is stored in CanvasContent1 and that I can retrieve it using the item ID:

https://contoso.sharepoint.com/sites/SiteName/_api/web/lists/getbytitle('Site Pages')/items(1)?$expand=ContentType

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

From here I get, among others, the SchemaXml, CanvasContent1 and LayoutWebpartsContent attributes

I also tried adding /FieldValuesAsHtml, /FieldValuesAsHtml, /FieldValuesAsText or /ContentType to the URL, but I basically get the same information.

I have also tried this GRAPH API: https://graph.microsoft.com/beta/sites/{mysiteid}/pages/{mypageid}?expand=canvasLayout

I know that pages have sections and columns. This is all I know, but now I don't have an idea what to do with all this information. I have managed to use all the other graph APIs and SharePoint for my purpose, which is to show the list of news from a site, but now I can't show the detail of the news due to the complexity in handling all this information.

1 Answer 1

1

You can do it with PnP PowerShell (and maybe with PnP Code SDK):

Get-PnPPage 
Get-PnPPageComponent

PnP Cmdlets:

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.