Added support to query the api