API (Application Programming Interface)
API is an acronym for Application Programming Interface. API is a set of rules and mechanisms that enable and specifies the interaction between various software programs or applications. It is a combination of protocols, commands, and objects using which developers can connect different programs with an access to specific features. API ensures software-to-software interaction. But it is not a user interface.
Every API has a documentation written for developers. The documentation specifies the API syntax, specifics of its operating, ways to solve potential issues. It brings standardization and simplification to interaction between applications.
Example of API
An application is downloaded and installed on a mobile device. A user makes a request and the application sends the request to a server via Internet. The server receives and interprets the data, performs required actions and sends the results back to the mobile device. The application gets the data, interprets it and presents to the user in a readable form. All these actions happen due to API.
A button for sharing data on social networks, e.g., Facebook, Twitter, embedded on a website can perform the function via API.
Web service APIs
A number of protocols, e.g., sets of rules for data transferring, can be used for developing web APIs. In order to realize different systems, the following protocols can be used:
SOAP (Simple Object Access Protocol) is a protocol for exchanging data between various platforms in XML format over application layer protocols like HTTP, FTP (File Transfer Protocol), etc. It uses a strict data typing that ensures the protection of data during its sharing between a client and a server. SOAP uses an interface that can include almost unlimited number of methods.
REST (Representational State Transfer) is an architectural style that enables the interoperability of software and computer systems on the Internet. It does not depend on specifics protocols. It provides a flexible integration by using a standardized set of processes. REST models have no requirements for data typing. This reduces the size of packages. REST bases the concept of resources, and it has a limited number of methods.
XML-RPC (Extensible Markup Language Remote Procedure Call) is a remote procedure call that uses XML to encode the data and HTTP to transfer information between a client and a server. It provides a standardized set of commands and data types which developers use to get access to the functionality of another program.