dynamic api url generation