Get paginated list of queries. If query ids are provided, the returned list will include only those queries. Queries not found from the provided ids list will be ignored.