added correct way to generate sql api url