SOLVED

How to get all pages under "sitePages" using SharePoint REST API in modern sites ?

Copper Contributor

I have created number of pages under "/SitePages" and want to retrieve them using SharePoint REST API.

The below one's doesn't work

_api/web/lists/getbytitle('SitePages')/Items

_api/web/lists/getbytitle('Pages')/Items

 

4 Replies
best response confirmed by Tarundeep Singh (Copper Contributor)
Solution

Got It -- Resolved --

/_api/Web/Lists(guid'SomeGUID')

/_api/Web/Lists(guid'SomeGUID')/Items(19)?$select=ID,Title

_api/web/lists/getbytitle('Site Pages')/Items

 

With a space as its looking for the Title not url :)

 

Cheers

@Tarundeep Singh Can you please elaborate little bit

I'm still couldn't get it

@Kumar0001 

Spoiler
1 best response

Accepted Solutions
best response confirmed by Tarundeep Singh (Copper Contributor)
Solution

Got It -- Resolved --

/_api/Web/Lists(guid'SomeGUID')

/_api/Web/Lists(guid'SomeGUID')/Items(19)?$select=ID,Title

View solution in original post