Kullanıcı Kılavuzu

Create Custom Actions with API Connectivity

Create Custom Actions with API Connectivity

When developing applications on the Kuika platform, creating custom actions with the API is a powerful way to extend the functionality of your application and make data operations more dynamic. You can add various data source connections and actions to your applications using Swagger API through the Kuika Datasource module.

In this course, you will learn how to create custom actions with the API, how to configure them and why they are important in the application development process.

This training content consists of the following topics:

  1. Data source connection with Swagger API
  2. Using Swagger API actions on application screens
  3. Display dynamic data in a table
  4. Testing and previewing work

1. Connecting a Data Source with Swagger API

  1. Log in to the Kuika platform and open the project you will work on from the Apps screen.
  2. Go to the Data Sources module.
  3. Add a new data source by clicking the + icon on the Sources tab.
  1. Select the Swagger API option and enter a name (like KuikaSwaggerAPI ).
  2. Click the CREATE button.
  3. Enter the Swagger URL and Base URL:
  • Swagger URL: https://builder3.kuika.com//KuikaSwaggerAPI/swagger/docs/v1
  • Base URL: https://builder3.kuika.com/KuikaSwaggerAPI
  1. Select No Auth as the authentication type. (If the API requires authentication, you can use Kuika Auth or API Key.)
  2. Create the data source by clicking the CREATE button.

2. Using Swagger API Actions on the Application Screen

  1. Create a list screen: Add a Table element to list product stocks.
  1. Name the table columns: ID, Stock Code, Product Name, Barcode, etc.
  1. Add Initial Action:
    • Click +ADD ACTION button from Properties panel.
    • Follow the path Initial Actions > Custom > Datasource.
    • Select Stock Get Product List From Rest action underRest heading.
  2. Connect the table data source:
    • From the Properties panel, go to the Datasource menu.
    • Under theAction heading, select the Stock Get Product List From Rest action.

3. Show Dynamic Data in a Table

To bind data from the API to the table:

  • ID Info: Select the Label element, select ID under Field to Display from the Properties > Value menu.
  • Stock Code: Select the Label element, select Stock Code from the Field to Display menu.
  • Product Name: Select the Label element, select Stock Name from the Field to Display menu.
  • Barcode Info: Select the Label element, select Stock Barcode from the Field to Display menu.

4. Testing and Previewing Work

  • After making all the adjustments, click the Preview button.
  • Check if the data from the API is correctly transferred to the table.

By creating custom actions with the API, you can make your Kuika applications more dynamic and data-driven. Thanks to the Swagger API integration, you can provide real-time data flow to your application and easily visualize the information coming from the API.

Glossary

No items found.

Alt Başlıklar