First of all, SharePoint REST does not support request batching like CSOM does. That makes it impossible to make multiple REST calls in a single round trip to the service.
The good news that according to Office 365 business roadmap the feature:
CSOM Batching for Apps for SharePoint
This feature allows support for $batch requests in SharePoint's OData
REST services. This allows apps to make multiple REST calls in a
single round trip to the service.
is already in Development state. Hurray! Thanks to the Office Developer Platform UserVoice for that and specifically to Andrew Connell for creating a feature request
From another hand, Search Query API
could be used for querying multiple lists, for example the following search query:
contentclass:STS_ListItem AND ContentType:Task
will return all Task items.
JavaScript Example
The following example demonstrates how to utilize Search API using REST endpoint:
function searchTaskItems(webUrl,success, failure) {
var url = webUrl + "/_api/search/query?querytext='contentclass:STS_ListItem AND ContentType:Task'";
$.ajax({
url: url,
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
success: function (data) {
success(data.d.query);
},
error: function (data) {
failure(data);
}
});
}
//print tasks
searchTaskItems(_spPageContextInfo.webAbsoluteUrl,
function(query){
var resultsCount = query.PrimaryQueryResult.RelevantResults.RowCount;
for(var i = 0; i < resultsCount;i++) {
var row = query.PrimaryQueryResult.RelevantResults.Table.Rows.results[i];
var taskName = row.Cells.results[3].Value;
console.log(taskName);
}
},
function(error){
console.log(JSON.stringify(error));
}
);