Object queries in API server. Closes #2