Replaced manual URL generation by retrieving from API.

Change-Id: Ia2ae968c0186c91dc9401c58840f13c1ab9882e8
Merge "Replaced manual URL generation by retrieving from API."