Dynamic relay assignment in api url