Write a thorough literature review on the security risks, challenges and countermeasures for securing APIs.