An Application Programming Interface can be thought of as a widget in the larger machinery of a modern web application. This widget could return data to an interior part of the machinery, or it could deliver information to someone making a request in their browser. APIs came along with the development of an asynchronous, or RESTY way of web development. In the olden days, web pages were wholly replaced with each mouse click.
The modern internet serves elements of a page as needed, and APIs are a critical part of delivering this information, whether to the browser or behind the scenes to middleware or backend services. API testing ensures that these endpoints don't disclose data they shouldn't or perform unexpected actions. The ‘hack' of Parler in 2021, where even data that users believed they had deleted, was obtained through enumeration of an insecure API.
A vulnerability in an API can be just as grave as a vulnerability found in any other system and can have the same potential, depending on the circumstances, to be company-ending. In short, API testing verifies that no widget has gone rogue.
Application program interfaces (APIs) are very similar to web applications. The primary difference is that a web application typically has an HTML based graphical interface that allow users to navigate. APIs are typically used for client-server interactions that are scripted out but may not be as straight forward of an interaction as a graphical user interface (GUI). SOAP API endpoints utilize an XML format and each request, and its parameters are defined within the Web Services Description Language (WSDL). Restful APIs are freeform and do not have a standardized documentation style.