Forum Discussion

Nikhil Nulkar's avatar
Nikhil Nulkar
Brass Contributor
May 09, 2017

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 on a custom UI page.

 

Can anyone guide me in the right direction?

  • I found this question because I was trying to get CSWP to work with news pages in the modern team site. I have been unsuccessful. I'm not trying to display on a custom UI page like you, I'm curious if my inability to get CSWP to work with these sites is user error or a known/planned issue? I haven't found much online help either way.

    • Nikhil Nulkar's avatar
      Nikhil Nulkar
      Brass 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 Marshall's avatar
        Alan Marshall
        Steel Contributor
        We 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.
    • Nikhil Nulkar's avatar
      Nikhil Nulkar
      Brass Contributor

      Thanks! :)

       

      One of developers in the team found that out too! Will need to try this out and see what all we are able to get with it.

Resources