added generic method for generating hash+appending url to API controller