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 :)

Plexus81
  • 2,250
  • 3
  • 36
  • 63
  • 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 02 '15 at 15:24
  • Does it have restriction on site collections? Can I ask for a list in another site collection? – Plexus81 Mar 02 '15 at 15:28

2 Answers2

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.

wjervis
  • 5,738
  • 24
  • 45
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?

Steve Curran
  • 586
  • 3
  • 4