It is not easy to classify program interfaces, because there are thousands of them. In the context of mobile applications, we are most often talking about APIs written by backend programmers.

If we divide APIs for a mobile application in terms of technologies, we can distinguish such large subspecies.

  • RPC (Remote Procedure Call) – interfaces that are based on calling functions or procedures in remote nodes / third-party systems.
  • SOAP (Simple Object Access Protocol) – interfaces built on the protocol of information exchange in a distributed computing environment.
  • REST (Representational State Transfer) – interfaces based on architecture for distributed systems.
  • GraphQL – an agnostic data query description language that allows a client to interact with multiple nodes within a single query.

The REST style is simple, secure, not constrained by protocols, and platform independent. REST API for mobile application can be written with any languages used in website development: PHP, Python, Ruby, and others. Regular app users don’t have to think about how to recognize an app’s API, because their experience is not affected in any way.

API as a set of functions

To visualize how an API works, it’s worth talking about the concept of a function in programming. If you’ve ever been interested in development, you’re familiar with it.

A function can be described as a logical block that receives data as input, performs some operation with them, and outputs the required information. In essence, an API is a function or a set of functions for communication between platforms. Its task is to set a standard for data transfer.

The internal structure and set of API functions may look different. It all depends on how developers organize it. You can make one common API with a standard set of functions, or you can form a set of separate interfaces by functionality or other criteria.

To add API support, developers define the format of data transfer, prepare a list of necessary functions, and work out parameters for each of them.