What is an API?
What is an API?
The go-to blog if you don't know yet!
An API (application programming interface) is a software-to-software interface that enables two applications to exchange data. By connecting an API to your software, you can expand your software package and offerings in a more time and cost-efficient manner.
‘’Here is a real-life API example. You may be familiar with the process of searching flights online. Just like the restaurant, you have a variety of options to choose from, including different cities, departure and return dates, and more. Let us imagine that you’re booking you are flight on an airline website. You choose a departure city and date, a return city and date, cabin class, as well as other variables. In order to book your flight, you interact with the airline’s website to access their database and see if any seats are available on those dates and what the costs might be.
However, what if you are not using the airline’s website––a channel that has direct access to the information? What if you are using an online travel service, such as Kayak or Expedia, which aggregates information from a number of airline databases?
The travel service, in this case, interacts with the airline’s API. The API is the interface that, like your helpful waiter, can be asked by that online travel service to get information from the airline’s database to book seats, baggage options, etc. The API then takes the airline’s response to your request and delivers it right back to the online travel service, which then shows you the most updated, relevant information.’’ (Mulesoft, 2022)
‘’APIs exchange commands and data, and this requires clear protocols and architectures -- the rules, structures and constraints that govern an API's operation. Today, there are three categories of API protocols or architectures: REST, RPC and SOAP. These may be dubbed "formats," each with unique characteristics and tradeoffs and employed for different purposes.
REST: The representational state transfer (REST) architecture is perhaps the most popular approach to building APIs. REST relies on a client/server approach that separates front and back ends of the API, and provides considerable flexibility in development and implementation. REST is "stateless," which means the API stores no data or status between requests. REST supports caching, which stores responses for slow or non-time-sensitive APIs. REST APIs, usually termed "RESTful APIs," also can communicate directly or operate through intermediate systems such as API gateways and load balancers.
RPC: The remote procedural call (RPC) protocol is a simple means to send multiple parameters and receive results. RPC APIs invoke executionable actions or processes, while REST APIs mainly exchange data or resources such as documents. RPC can employ two different languages, JSON and XML, for coding; these APIs are dubbed JSON-RPC and XML-RPC, respectively.
SOAP: The simple object access protocol (SOAP) is a messaging standard defined by the World Wide Web Consortium and broadly used to create web APIs, usually with XML. SOAP supports a wide range of communication protocols found across the internet, such as HTTP, SMTP and TCP. SOAP is also extensible and style-independent, which allows developers to write SOAP APIs in varied ways and easily add features and functionality. The SOAP approach defines how the SOAP message is processed, the features and modules included, the communication protocol(s) supported and the construction of SOAP messages.’’ (Bigelow, 2021)
The WeFitter Connections API is a REST API, REST offers more flexibility in its rules and offers more option like JSON and HTML when it comes to requests and responses, whereas SOAP relies on XML, something that REST offers as well. Also because data security is of high importance in the health industry, REST offers a secure solution to the users of the API.
API integrations enable you to achieve your platform goals easier and faster. The WeFitter API allows you to connect to the most popular and most used wearable and fitness app connections. Save time with the easy-to-integrate WeFitter API, to get all your needed wearable connections in one. With WeFitter’s unique gamification options, we boost engagement through different types of gamification components like badges, leaderboards and challenges.
Excited to start integrating? Book a FREE demo now!