Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, December 15, 2017 3:41 PM
Hi,
I want to get sharepoint list data using Rest API. But from list except 2-3 item id I want to get all list data. How to pass that condition?
Please reply
All replies (2)
Friday, December 15, 2017 3:49 PM
Hi Partik,
Unfortunately, it is not possible to grab a list view via REST directly. You can get the syntax for what you can grab for a list with REST by typing something like this into your browser and viewing the page source:
https://domain/sites/sitename/_api/web/lists(guid'4065067c-e4b8-46d5-a433-76b27f508d1d')
Check this one where you can perform the first request to get CAML Query for List View using SP.View.viewQuery property and then perform the second request to retrieve List Items by specifying CAML Query
https://stackoverflow.com/questions/26884647/using-rest-to-fetch-sharepoint-view-items
KRISHANA KUMAR
SharePoint Architect
Please click "Mark As Answer" if this post solves your problem or "Vote As Helpful" if it was useful
Friday, December 15, 2017 3:52 PM
You can do in following way:
http://gadcsp07d/site/subsite/_api/Web/Lists/getByTitle('listName')/items?$select=*&$filter=(ID ne 525) and (ID ne 526) and (ID ne 527)
in filter pass column name and then ne = 'Not Equal', and ID which you want to skip. If you want to skip more than one use 'and' operator