I’m not in the IT sector but I’m beginning to understand the logic behind sending requests and receiving responses for various reasons. What was used before APIs became the standard for communication between systems?
Edit: I understand now that I’ve been in fact asking about REST API.
In: Technology
An API is a formal definition of how a bit of self-contained software that performs a pre-defined, specific set of tasks, can be communicated with. It specifies what input values it expects, the format of that input and describes the output to expect from it.
Thanks to APIs, a software developer needing to perform such tasks could do so without needing to know how that bit of software actually worked. They could treat it as a so-called black box.
Once software systems grow beyond the most basic of systems, good architectural practise dictates that, rather than have one huge program file that does everything, you split the code into logical smaller files called modules and pass data vales back and forth between them.
These modules might have been developed by yourself or by third parties.
In any case, your code needs to “interface” with the called modules. It’s the interface you need to program your application to use. Hence Application Programming Interface (API).
In the internet and service oriented architecture era, “API” has come to mean communicating with remote systems but as explained above, it has a broader definition.
To answer your question, seperate systems would communicate with each other by sending batches of data in fixed format files. Expected record structures would be documented and programs would have to be written to validate that the received data conformed to the expected format.
XML was a bit of a revolution in terms of being able to have the data files almost self document themselves, and then XSL allowed one to formally define the structure and generic tools could be used to validate the structure.
XML however was a bit too verbose and a lot of bandwidth was wasted on transferring meta data.
JSON is lighter on that. And CBOR even more compact.
Latest Answers