Refactor api calls and now can query id array

Now by passing in an array of ids, one can get a list of objects
from the API.