n1ql queries running against system

select * from system:keyspaces; 

Will give you a list of buckets in the system