How to query Watson IoT historical data

#1

I setup Watson IoT to send data to cloudant DB. Cloudant create a new database for every week. How can i query all databases for device events using Cloudant Node?