Kuika's API Builder module offers you the possibility to turn your application into a data source for other applications and services. API stands for “Application Programming Interface” and is an interface that allows a software application to communicate with another application or service. APIs allow different systems and applications to exchange data in a standardized way so that applications can easily interact with each other. The API Builder module enables your application to be used as a data source by other platforms, making it easier for the application to send and receive data. For example, you can enable a food ordering application developed on Kuika to retrieve a restaurant's menu. For this process, the API provides an endpoint (URL) that will allow your application to access the restaurant menu. Your app sends a request to this URL and can retrieve the restaurant's menu and display it to the user. Likewise, when an order is placed, your app can communicate that order to the restaurant through the API and receive feedback on the order status.In this tutorial, you will learn how to configure API definitions using Kuika's API Builder module.
This training content consists of the following topics:
API Builder Panel is a control panel where all API Builder definitions created on Kuika are managed together. Thanks to this panel, you can perform API management quickly and easily. The main functions offered by the API Builder Panel on the left side are as follows:
Once the API Builder is created, you can start defining a new method by clicking the ADD NEW METHOD button in the upper right corner of the screen. After this step, you can set a name for the method and configure the properties of the method. During the method creation process, you can use the Properties panel on the right side of the screen to authorize and add actions. You can delete or rename the methods you created at any time.
Fields in Properties Panel:
3. Method Input: If your method will work by taking a specific input value, you can define input properties through this field. These properties include details such as input name and type.
For example, let's say you are developing an application that serves menu content. In this application, you may want to take a Barcode number as input and return the status code as respons.
You can write the necessary queries by entering the SQL Editor field. The SQL editor accepts queries that you write by hand or queries created with the help of artificial intelligence. For example, you can add the following query:
SELECT Barcode, Status FROM Menu WHERE Barcode = @Barcode
2. Give your action a name (for example, Status Inquiry) and click the CREATE button. To call this action into an API Method, click the +ADD ACTION button and add the action by typing Status Inquiry in the search bar.
3. Define the parameter of the created action as Action Results → Status Inquiry via Symbol Picker.
4. The Barcode parameter you specified with "@" in the SQL Editor must be opened to the API as an external method input. For this, click the +ADD METHOD INPUT button, type Barcode in the Input Name field, set the input type as Guid and click the Create button.
The action you created is ready to receive external parameters and execute SQL queries. Click the Preview button to test all configurations. As a result of the preview, you can view your API and the added method operations by clicking Swagger in the URL section. You can set whether these operations can be viewed only by logged in users or by everyone in the Authorization field in the Properties panel.