0

I know that I can use search REST api to fetch data from SharePoint. But is there a way to get a list without having to index the list?

I'm having a problem that search (Continues crawl) is to slow to index the list. I'm trying to find out how I can get a list from a user personal sites using REST instead of a Content Search Web part.

Let me refrase this question: If I add a item to a list, and the search have not yet crawled it. Could I with REST get information from the list?

The list is another site collection :)

  • But do this uses the search index or does it fetch information from the list? Will I get the information if it's not in the index? – Plexus81 Mar 2 '15 at 15:24
  • Does it have restriction on site collections? Can I ask for a list in another site collection? – Plexus81 Mar 2 '15 at 15:28
1

Yes, you can use REST to query a list regardless of Search and its crawl status.

You can use REST to list items from any list on any site in any site collection.

To view a list: <site>/_api/Web/Lists/GetByTitle('My List') or <site>/_api/Web/Lists(guid'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')

To view list items: <site>/_api/Web/Lists/GetByTitle('My List')/items

Closest things you can get to a restriction are that the user must have permissions to the list, and if in an app, the app must have the appropriate permissions as well.

Here is a link to get started with REST.

|improve this answer|||||
0

You can use REST to query a list using the GetItems method and passing in a CAML query. Unfortunately, this will be subject to any list throttling limits. I recommend you search on values that are indexed columns in the list. The following thread explains a lot how to do this. How can I query for "AssignedTo = [ME]" using REST?

|improve this answer|||||

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.