Handle duplicate URLs, api by demand only

Change-Id: I403bc961bf9f98dd2c7cf4cbb71862a95d89d819