change license to Apache 2.0
fix support for SSL on api query