Forum Discussion
Nikhil Nulkar
May 09, 2017Brass Contributor
Modern SharePoint Sites - News Page API
Hey folks - So I'm looking to see if there's a way to programatically (API) get the news page (& its content) from the modern team sites? I want to use the news pages and its content but display it o...
Alan Marshall
Jun 19, 2017Steel Contributor
It's actually just a query of pages where a column says it should be promoted. If you use the network view on the SharePoint page, you can find the call to the API.
https://spe248239.sharepoint.com/_vti_bin/homeapi.ashx/news?start=0&count=200
https://spe248239.sharepoint.com/_vti_bin/homeapi.ashx/news?start=0&count=200
Nikhil Nulkar
Jun 20, 2017Brass Contributor
Thanks Alan Marshall for the link too. Were you able to get the news page description too? We noticed that these API calls only get a very limited characters as a response. Can we get the entire news page content through the API? Is there something you know we can do to get that too?
- Alan MarshallJun 20, 2017Steel ContributorWe have used the API as is to show SharePoint News alongside corporate News on an Intranet home page so the summary was sufficient.
You can also get the data through search that may contain more of the content but generally the index only has a summary.
I think i saw an article by Elio Struyf on how this search query works. You can also just use the network trace on a SharePoint site to find this.