Fix query domain and assembly of query parameters for latest version of API