2

The goal is to use REST to pull content into a homegrown mobile app. I'm able to run simple API calls like this and get results:

https://xxx.sharepoint.com/sites/xxx/_api/web/lists/getbytitle('Site Pages')/items?$select=Title

But I can't figure out how to get the full content of news posts, which I believe is in a container named "CanvasContent" i.e title, author byline, first published date, body content, banner image thumbnail, etc.

2 Answers 2

2

You can call the rest with this end point:

https://xxx.sharepoint.com/sites/xxx/_api/web/lists/getbytitle('Site Pages')/items

This will provide you with results of all information.

1
  • 1
    See my answer...
    – matt
    Commented Jun 19, 2020 at 3:34
1

I had already tried @ganesh sanap's suggestion but it doesn't get the body content. Figured it out though - needed to add CanvasContent1 in the query so this works:

/_api/web/lists/getbytitle('Site%20Pages')/items?$select=Title,CanvasContent1,FileLeafRef

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.