First of all, lets start by defining what is an API :
API is a sum of rules and protocoles on which we base the development of a software, in other terms, it is what assures the communication between the data giver and the seeker of data through queries initiated as call - response.
We can think of an api as a communication tunnel between 2 systems .
REST api is a type of api that respects a certain architecture constraints , hence it’s implemented inside the development of the software .
The caller sends a REST query to the responder, which will be parsed into one of many forms , HTML/XML/JSON etc, and this requests contains various information such as session cookies, authorisation, URI and others .
To be exact, a RESTful api should be built as client-server architecture and all its requests must be managed by http, it shall also be stateless, or in other terms, no data about the client or server shall be stored between requests nor shall requests be interconnected and finally the data structure must be standardised so that everyone could manipulate it, distribute it easily and it shall also contains all the needed information for the client to understand it .
Rest makes api protocoles faster and more lightweight thus it is used in Microservices architecture .
SOAP on it's turn, is another approach to transmit data, and a way of implementing an api that way first created to make it possible for an application that was built using different languages and on different platforms to communicate.
Although its sounds cool, it still presents a problem which is the intensification of the operations through strict and hard rules which makes the communication slower and the necessity of resources higher .
Despite the fact that SOAP presents high inconvenience, many organisations still opt for this approach for the built in security and compliance that it presents which aligns well with their needs.
Whatever API approach we opt for, we are in need of standardisation of info.
Therefore WSDL has the role of describing the protocoles and infos through offering an XML document that contains various information related to networking, services , binding and also definitions .