Also, hiding any information irrelevant to the user, regardless of the user's role is equally important. APIs often return all possible information on an object, and then the web application front-end filters out the data it doesn’t need. API security best practices dictate such data exposures should be avoided because they can be abused, especially when combined with other vulnerabilities. Instead of having API endpoints that return a massive amount of data that the front-end filters, creating many endpoints with specific scope as to what data they return is advised. For example, the API call /getinfo, which may return all the information about an account, can be broken down to /getusername, /getcontactdetails, etc. That way, the application's front-end can pick what data it needs and from which endpoints, avoiding unnecessary data exposure.