10 questions and answers about APIs

Feel free to Share this Article:

Illustration representing APIs

Author: Stephanie Sigrist

Category: IT Basics

August 11, 2021

 

What can an API do? What types of APIs are there? How do APIs work? Why are more and more companies publishing their APIs? What criteria must a rest API fulfil? We have answered the most important questions about APIs here.

What is an API?

API stands for Application Programming Interface and is a programming or application interface whose code allows two or more software programs to communicate with each other. APIs can be used for web-based systems, operating systems, database systems, computer hardware or software libraries. According to a report by tech giant IBM, APIs have become "the digital mirror image of an organisation".

What does an API consist of?

An API consists of several tools, definitions and protocols, which can vary greatly depending on the application area.

However, APIs always contain the following components:

  • Technical specification: these describe the possibilities of data exchange between the solutions, whereby the specification is in the form of a request for processing and data delivery protocols
  • Software interface written for the specification it represents

The software that needs to access information or functions of another software calls its API, specifying how the data or functions must be provided. The other software provides the data or functions requested by the first application. The interface through which these two applications communicate with each other is specified by the API.

What is the history of APIs?

"APIs date back to the early days of computing, well before the PC. Back then, they were primarily used as libraries for operating systems. They mostly operated on the respective system of their installation, but were now and then also responsible for forwarding messages between mainframes. Almost 30 years later, APIs had finally overcome the limitations of their local environments. At the beginning of the new millennium, they then became an important technology for remote data integration," writes the US software producer Red Hat.

What does an API do?

According to the digital computer magazine ComputerWeekly, an API "defines the correct way for a developer to request services from an operating system (OS) or other application and output data in multiple contexts and through multiple channels." With an API, products or services can communicate with each other regardless of their implementation. In this way, application development can be optimised. Over the past decades, APIs have made an important contribution to the evolution of software around the world. The increasing number of web services provided by cloud providers via APIs also promotes the development of cloud solutions, the Internet of Things (IoT) and mobile applications.

How do APIs work?

APIs consist of two interrelated elements as explained above. The first is a specification that describes how information is exchanged between programs and the second element is a software interface that is written to that specification and published for use in some way. The software that wants to access the functions and capabilities of the API should call it, and the software that creates the API should publish it. "Because APIs make it easier for developers to integrate new application components into an existing architecture, they automatically support collaboration between businesses and IT teams," Red Hat explains.

What types of APIs are there?

A distinction is made between three types of APIs, which relate to release policies and access rights: Private, Public and Partner.

  1. Private API: A private API is hosted by in-house developers. Private APIs act as front-end interfaces to back-end data and application functions. The interface provides an entry point for developers or contractors working on the development of these functions.
  2. Public API: A Public API (also called an open or public API) is an application programming interface that is made publicly available to software developers. Open APIs are published and freely shared on the Internet, allowing the owner of a network-accessible service to provide universal access to consumers. According to Red Hat, a public API has high business value because it simplifies and extends the connection to partners and provides for potential monetisation of data.
  3. Partner API: The API is shared with selected business partners. Specific rights or licences are required to access a partner API.

PUblic APIs: Why are more and more companies publishing their APIs?

API publishing is the process of preparing APIs for the internal developer community, partners and customers. "APIs are more than technical channels for sharing data. Well-designed APIs provide organisations with a vital connection to data and services that enable rapid innovation, open markets for new goods and services, and serve as a foundation for future partnerships. APIs have become an indispensable external representation of an organisation," says the IBM report mentioned above. Public APIs accelerate innovation by facilitating collaboration with external developers. In 2013, an article in the US computer magazine "Wired" even spoke of an "API revolution" in this context. This is about solving the problems that companies or institutions face when collaborating with internal and external developer communities.

Open APIs also extend the reach of brands and solutions. By making technology available to the public - as is the case with a public API - developers are encouraged to create an app ecosystem. When recruiting new tech employees, it can also be an advantage if developers who are highly sought after in the job market have already been exposed to a potential employer's APIs.

Companies need to bring new products to market faster and faster to stay competitive. The Swiss cloud infrastructure platform Xelon HQ helps companies to develop, test and operate new solutions and applications. Book a demo now or contact us to find out how Xelon HQ can help you expand your portfolio and grow your business.

What do companies need to bear in mind when making their APIs public?

The API company Akana emphasises the importance of recording what users need to consider before publishing APIs. Good documentation makes the purpose and use of an API clear to the target group and includes examples of how to use the API correctly. Ideally, the API operations are explained in the documentation from the perspective of a use case. In addition, publishing in a sandbox makes sense in many cases. This allows solutions to be tested in a protected environment and the APIs are not permanently changed. Versioning is also a best practice for publishing APIs, according to Akana. This ensures that companies can implement improvements to their API in a new version without breaking the old API version.

The marketing team should also be involved in the release of APIs: "Companies need to consider the impact of APIs on branding and positioning," IBM writes in the API Report and provides the following tips for doing so: "An engaging API experience combines branding, design thinking and principles, and a community of trailblazers. A clear API promotional strategy integrates digital presence, participation in events and interaction with influencers. A successful pattern for API branding includes consistency, clarity and permanence."

What is a Rest API?

A term often used in connection with APIs is Rest-API, which is why we also examine Rest-APIs here. A Rest API is an API or web API that is subject to the constraints of the REST architecture and enables interactions with RESTful web services. REST stands for 'Representational State Transfer' and is a collection of architectural constraints developed by US computer scientist Roy Fielding. When a client request is made via a RestAPI, it transfers a representation of the resource state to the requestor or endpoint. The representation or the associated information is provided in one of the following HTTP formats: JSON (JavaScript Object Notation), HTML, XLT, Python, PHP or Plain Text.

Extra tip: Did you know that all functions in the Xelon HQ can also be accessed via Rest-API and integrated into your systems?

What criteria must a Rest API fulfil?

Red Hat defines the following criteria for Rest APIs:

  • a client/server architecture consisting of clients, servers and resources that manages requests via HTTP
  • Stateless client and server communication (i.e. no client information is stored between GET requests and the individual requests are separate).
  • Cacheable data that optimises client/server interactions
  • a uniform interface between components to transfer information in a standardised form. In turn, the following criteria must be fulfilled for this:
  1. The requested resources are identifiable and separated from the representations sent to the client.
  2. Resources can be manipulated by the client via the representation they receive because it contains enough information for this.
  3. Self-describing messages returned to the client contain enough information to describe the way the client processes them.
  4. Hypertext/Hypermedia: The client should be able to find all current available executable actions using hyperlinks after accessing a resource.
  • A multi-level system used to organise all server types involved in retrieving the requested information in hierarchies invisible to the client.
  • Optional: Code-on-Demand (the ability to send executable code from the server to the client on demand, extending client functionality).

Despite the long list of criteria, REST is about guidelines that can be implemented flexibly. "This in turn makes Rest APIs faster and more compact with improved scalability, making them perfect for the Internet of Things (IoT) and mobile app development," Red Hat concludes.

Would you like to find out what Rest-APIs can do for your company? Contact us for a no-obligation consultation.

In the Xelon Knowledge Base you can find more articles about the API:

Postman API Monitoring: Automatic monitoring of REST API endpoints

API Response Test with Postman

false

Stephanie Sigrist

Subscribe to our newsletter!

Don't miss any of our IT blogs and be the first to know about Xelon news or offers.

Related News

IT Basics

The last 5 IT-Terms Blog is way too long ago, so here comes a new part now! You can expect the...

April 2, 2020

2 mins read

Business IT infrastructure

Scalability, cost efficiency, the expansion of the portfolio without investment costs and a chance...

February 1, 2021

4 mins read

Business IT service providers

Find out what the Swiss ICT industry could learn from financial technology - where more and more...

September 15, 2022

2 mins read

Kubernetes

What's Kubernetes? Kubernetes (also known as K8s) is an open source software introduced in 2014 for...

March 18, 2020

4 mins read