0

Is there any rest API available to get the recent updates or news related to a site in SharePoint Online?

How To Read The SharePoint News Using Rest API In SPFx

I have found above post but it does not work for me as hitting the API's only gives error or irrelevant XML data.

So, I wanted to know if there is any way to get the news of SharePoint site using rest API ?

Updated:

API

_api/search/query?querytext='IsDocument:True AND FileExtension:aspx AND PromotedState:2

Error:

enter image description here

  • Can you please post the api url you are using and also please update post with the error you are seeing for better understanding. – Rare Solutions Oct 22 '19 at 16:28
0

It looks like you are missing the ending single quote. Update the API call to:

_api/search/query?querytext='IsDocument:True AND FileExtension:aspx AND PromotedState:2'

Furthermore, you'll need to encode this to use it. Change your spaces to %20 and your single quotes to %27 like this:

_api/search/query?querytext=%27IsDocument:True%20AND%20FileExtension:aspx%20AND%20PromotedState:2%27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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