User Manual

Rest API Data Source User Guide

24/9/26
Rest API Data Source User Guide

Rest API

The Rest API is one of the external data sources you can use on the Kuika platform. You can integrate an existing REST API into the app you’re developing on Kuika as a data source. In this tutorial, you’ll learn how to connect a data source to your app using a REST API.

‍

Add Data Source Connectivity to Your App with Rest API

  1. Log in to the Kuika platform and open the project you’ll be working on from the Apps screen.
  2. Open the Datasources module from the top menu. In this module, you can view the data sources and actions in your application under the Recently modified and Data sources tabs, search using the Search by name field, and add a new data source.
  3. Click the Create an API card at the top of the screen. This card allows you to create Swagger, REST, OData, SAP, and MQTT broker connections.
  4. In the list that opens, select the REST API (RESTful web services) option under the APIs & Services heading. You can use the ↑/↓ keys to navigate the list and the Enter key to make a selection.
  1. Enter a name for your data source in the Name field (e.g., userguiderest).
  2. Click the CREATE button to complete the process. To cancel the operation, use the CANCEL button; to return to the connection type selection, use the < REST API link.

Note: You can also start the process of adding a new data source by clicking the + icon next to the Sources heading in the left panel.

Anatomy of a Rest API Modal

A. Top Menu

  • Back Button (←): Takes you back to the Datasources screen.
  • Data Source Name: Displays the name of the REST API data source you created (e.g., userguiderest). You can switch between data sources using the drop-down arrow next to it, or edit the name using the pencil icon.
  • CREATE Button: Saves the connection settings.

B. 01 Endpoint

Contains the service information that Kuika will connect to.

  • Service base URL (required): This is the API’s base service URL. Example: https://petstore.swagger.io/v2

You can view the description by hovering over the (i) icon next to the field.

C. 02 Authentication

Determines how Kuika will authenticate itself to the API.

  • Authentication type: This field lets you select the authentication type for API access. Options include No Auth, Bearer, Basic, and API Key.
  • Header Table: Consists of the Type, Key, and Value columns. The necessary rows are automatically added to the table based on the selected authentication type. You can define optional additional fields using rows of the Custom type.

D. Right Panel

  • Description: This is the field where you can add notes about your REST API collection.
  • Learn More: You can access the relevant documentation via the REST API user guide link.
  • After You Create: This indicates that the CREATE button saves the collection and opens the endpoint editor for a new endpoint.

Configure Rest API Connection Settings

  1. In the Endpoint section, enter the Service base URL.
  2. In the Authentication section, select the authentication type from the Authentication type field and fill in the relevant fields.
  3. If necessary, add Custom rows to the header table.
  4. If you wish, enter a note about the data source in the Description field.
  5. Click the CREATE button in the upper right to save the settings. After saving, the endpoint editor opens, and you can begin defining your first endpoint.

Rest API Authentication Types

1. No Auth

Used for services that do not require authentication. No additional configuration is required; if you wish, you can define additional fields using the Custom row in the header table (see rest_4.png).

2. Bearer

  1. Select the Bearer option from the Authentication type field.
  2. Kuika adds a row of type Username to the header table by default. The value of this row is fixed as {CurrentUserName} and represents the name of the user logged into the application; you can enter the header name to which this value will be sent in the Key field.
  3. You can add custom parameters using Custom rows.
  4. Enter the parameter information in the Key and Value fields (e.g., Key: client_id, Value: your_client_id).
  5. Click the CREATE button to save.

3. Basic

  1. Select the Basic option from the Authentication type field.
  2. Enter the Username and Password information. You can show or hide the password using the eye icon.
  3. Verify that a locked row of type Basic Auth., with the Authorization key and the value {BasicAuthToken}, has been automatically added to the header table. This row sends the token generated from the information you entered.
  4. You can add custom parameters using the Custom rows.
  5. Click the CREATE button to save.

4. API Key

  1. Select the API Key option from the Authentication type field.
  2. Enter the following information:
    • ID key name: The key name representing the client ID (e.g., client_id).
    • ID: The client ID.
    • Secret key name: The key name representing the client secret (e.g., client_secret).
    • Secret: The client secret. You can show or hide the value using the eye icon.
  3. Custom rows allow you to add custom parameters.
  4. Click the CREATE button to save.

By following these steps, you can integrate the REST API data source into your Kuika applications.

Glossary

No items found.

Alt Başlıklar