API is a technology that hides the complexity in software from software developers, allows the codes to be edited without breaking the architecture, and enables the components to be reused and communicate with the systems used correctly. API services are used to run the service or some of the services offered by a program on another program. In this case, it is defined as a set of services offered to the programmer so that he can perform certain tasks. Thanks to the use of API, software development processes have been accelerated and it has become easier to develop software from scratch. In addition, API provides automation, accelerates processes, and ensures programmability.


API provides communication between software and hardware. In addition, since it provides communication between users and servers, API plays a leading role in all applications that can be accessed over the internet. In applications used over the Internet, users’ requests are transferred to the server via API. Resources are consulted in order to fulfill requests received by the server. The result from the sources is transmitted to the user by the server through the API. Thus, the user gets a reaction from the application. In addition, using the API gives users a security advantage. Instead of sharing all data with the common server of the application, only the user request is transmitted to the server via API.
The API is a technology that allows an application or service to access a resource within another application or service at its most basic level. A created API implements certain protocols for applications to run. For example, the API created to display an image on a screen works in the same way on all hardware, regardless of user, manufacturer, or product. Regardless of which product is used, the API used ensures that all screens are displayed. Thus, it prevents the creation of software from scratch. There can be only one type of user for access to private data or API management, so users are authorized to access with a username and password. In services provided by the API, on-demand results can be filtered, listed, or sorted in a particular order. Transactions and results can be recorded, verification requests can be sent for the results received, or incoming queries for the high-traffic API are cached and queued depending on the traffic situation.
Virtualization is a system model while API is an abstract application control mechanism. For example, certain types of APIs are used by the OpenFlow protocol, SDN devices, network management systems, and applications that perform network analysis. Virtualization enables existing physical system descriptions to be reused in a logical environment. The API enables complete resource abstraction by providing scaling in applications connected to physical or logical systems. At this stage, it is absolutely necessary to use virtualization. Thus, in software-defined networks (SDN), performance losses that may occur at the network layer are reduced and packet losses that may occur in packet routing are reduced to zero. The more widely the network can be programmed, the more efficient and healthy the transmission will be. There are two main components in API management for SDN, Northbound, and Southbound. It provides communication with network devices in order to program the central controller data plane with Southbound API variants. With Northbound API variants, the controller, located at the central point, provides access to the device at the endpoint, obtaining information about the transmission or making configuration. Thus, with certain API types, the workload is reduced and high performance is achieved.

If the API was not widely used today, it would be necessary to develop special software for each device. Thus, the API can be thought of as a piece of software that has a modular structure and works on an application basis. However, API models used today are considered a product or service, not a piece of software. Because the API is designed for use by specific audiences, documented, and formatted to meet specific expectations. For example, an API model can only be created for System Experts or Mobile App Developers. Thus, it is aimed to provide more standard and disciplined service. Its usage areas include software libraries, internet-based applications, IoT devices, network hardware, operating systems, and different databases. For this reason, there is more than one type of API, depending on the area it will be used and the service it will offer. These;
- Open (Public) API: The service offered with minimum restrictions is open to everyone, including developers and other users. Its use is to enable users to access certain data or services. Thanks to the open structure, the software program has universal access. A software developer anywhere in the world can access the Open API and perform the integration they want. Thus, companies that use certain software in their daily operations can easily integrate this software into their systems. In addition, software developers benefit from API features by doing less coding.
- Internal API: It is the type of API that is hidden from external users and is only viewed and used by internal systems. The Internal API is not intended for external consumption, but for use in development teams for better productivity within the company and more efficient operation of services used within the company.
- Partner API: It is the type of API used only by the software developer or the company that created the API. Usage and development are not public, and special privileges are required to access such APIs. In other words, it is not possible to interfere with the private API from the outside. It is designed to build and develop the application interface and be able to communicate with the API beyond just enterprise boundaries.
- Composite API: A type of API that combines multiple data or service APIs. They are created using the API editing capabilities of an API builder. It allows developers to access several endpoints or multiple applications simultaneously in a single search.
- Remote API: A type of API designed to interact through a communication network. It is used when the server that the requesting user wants to access is not in the same environment as the user. Since the most widely used communication network is the Internet, most APIs are designed according to web standards. Not all Remote APIs are web APIs, but all web APIs belong to the Remote API variety.
- Soap API: The SOAP rule set is a client/server-based API type that uses the RPC (Remote Procedure Call) model for requests running on a web service. The entire process is transmitted as XML and via HTTP. Due to its XML structure, it is not preferred because it has stricter standards compared to REST. Initial setup for SOAP is more difficult compared to the Rest API build, but once configured it works fine. Translating/decoding code for XML is more difficult than for JSON structure. Also, XML works with a data structure categorized by JSON format.
- Rest API: REST, which stands for Representational State Transfer, creates an architectural model that enables data exchange between Server and Client (User) with the use of an interface. It provides practical, flexible, and fast communication between web services and the user with the use of REST architecture. REST data can be read using JSON (JavaScript Object Notation). The REST API can be developed using almost any programming language and supports a variety of data formats. The only condition is that it is designed by the constraints of the REST operating architecture.
REST API can be used not only within the developer’s application but also by any developer or user. Meeting the created demands by using the hardware at full capacity at once by the API puts a load on the system. In order not to encounter problems that may be caused by the overload on the system, incoming requests are broken down at certain intervals. It can be likened to the fragmentation step performed in a kind of packet transmission.
REST is a set of rules that define how applications or devices can connect and communicate with each other. The API that fulfills all the principles of this set of rules qualifies as the RESTFUL API. It provides a flexible and simple way to communicate between applications. REST APIs communicate via HTTP (HyperText Transfer Protocol) requests to perform standard database actions within a resource, such as creating, reading, updating, and deleting records (also known as CRUD operations). For this reason, the REST API can be compared to a website that works with HTTP requests in the web browser. Hence “GET, POST, PUT DELETE, etc.” commands are widely used to communicate with the REST API. In addition, certain hash algorithms are used in passwords used to ensure security, and HTTPS (Secure HyperText Transfer Protocol) is used in communication with SSL certification. Commands used in the REST API;

- GET is used to list and display data.
- POST is used to add data.
- DELETE is used to delete data.
- PATCH is used to update part of the data.
- PUT is used as a data update request.
Looking at the REST working structure, it is observed that it consists of six basic points.
1-Stateless: It is the fact that the session information of the user is not kept on the server. This information is kept only by the user. Thus, no historical wishlist or user list information is available on the server. All information is provided by the user.
2-Uniform Interface: It is the interface that works with a special rule set for communication between the server and the user. All API requests to the same destination are forwarded regardless of where the request came from. Requests from the source should not be too large but should contain all the information the user may need.
3-Cacheable: Whenever possible, resources should be cacheable on the client or server side. For this reason, the requests sent by the server are determined as “Cachable” or “Uncachable”. Thus, the user creates a cache mechanism according to the information sent and ensures efficient use. The goal is to improve performance on the user side while increasing scalability on the server side.
4-Client-Server: It should be designed in such a way that the server and the user undertake different responsibilities and operate completely independently without interfering with each other’s responsibilities. While the user is not concerned with the storage, which is the responsibility of the server, the server does not deal with issues such as user groups that belong to the user. Communications are initiated by the user and the server receives incoming requests. As a result, the user and the server can be developed independently of each other, and the portability and readability of the code written by the user will be high.
5-Layered System: In communications with the REST API, requests and responses pass through different layers that work independently of each other. It is designed in such a way that external layers such as the security layer or cache layer between the server and the user do not affect the bilateral communication. Thus, as if the server and user communicate directly with each other, it only recognizes the layers with which it is communicating.
6-Code on Demand: REST API usually provides static resource dispatch, but in some special cases, the responses allow different codes or the server to forward scripts to the user. In such cases, the code should only run on demand.
NOTE: The OpenAPI Specification (OAS) creates an interface for defining an API in a way that allows any developer or application to discover it and fully understand its parameters and capabilities. These; available endpoints are the operations allowed to each endpoint, transaction parameters, authentication methods, and other information. The latest version, OAS3, includes hands-on tools such as OpenAPI Generator for generating API clients and server code fragments in different programming languages.