Is it possible to query two list in the same time?
url: http://sites.com/url/_api/web/lists/GetByTitle(‘List1')
url: http://sites.com/url/_api/web/lists/GetByTitle(‘List1' and 'List2')
Is it possible to query two list in the same time?
url: http://sites.com/url/_api/web/lists/GetByTitle(‘List1')
url: http://sites.com/url/_api/web/lists/GetByTitle(‘List1' and 'List2')
Linked Lists
For Linked Lists you can specify that the request returns projected fields from other lists and the values of Lookups. To do this, specify the field name in both the
$select
and$expand
query options.Example
Assume the following linked lists -
Employee
andCompany
, whereEmployee
list contains Lookup column toCompany
list:Regular Lists
You need to perform two request since batching is not supported in REST API.
Example:
The following example demonstrates how to perform read operation for list items
Please follow an article Manipulating list items in SharePoint Hosted Apps using the REST API for a more details.
Then you could read list items from
Employee
andCompany
as demonstrated below:If you want to batch your query - you may use javascript client side object model. In that case when you do context.ExecuteQueryAsync() - you query all you defined before at one request.
If you need do it via REST - you can simple do two query async, they will execute in parallel.