Create mapping function for Identity API urls
Refactor