DATASOURCES MODULE

Datasource connection with Rest API

You can quickly connect your existing Rest Swagger API as a data source to an application you are developing. You can use the Datasources module in Kuika to provide this connection.

Before this learning content, we examined the operations of creating a connection to the data source with MSSQL and Rest Swagger API. In this learning content, we will examine the operations that need to be performed during the process of creating a connection to the data source with Rest API.

To make a data source connection with the Rest API, just like any other data source connection, open the Datasources view mode.

Open the new data source creation screen via the Create Datasource button in the Datasource view mode.

In the new data source creation screen, select Rest API, name it, and proceed to the next screen.

In the Rest API screen, you must first define the Service Base URL. In the next step, as in Rest Swagger API, you should select the authentication type and enter the necessary information for the relevant authentication type.

To make an authentication type selection, you can proceed by choosing No Auth, Kuika Auth, and API Key authentication types from the drop-down menu titled Authentication Type according to your Rest API structure.

As we mentioned in the previous learning content, if you choose the No Auth type, you don't need to set up any authentication. If you choose Kuika Auth or if you will authenticate from an existing API, you should select API Key. With the API Key selection, you need to enter the required information.

Similarly, to the previous learning content, if you consider a scenario where you proceed by selecting Kuika Auth, there are some steps you need to follow. In this scenario, you should perform parameter adding operations.

During the parameter addition, Kuika creates a value for the Username parameter by default to simplify the process for you. However, if you need to add custom parameters other than the default Username parameter, you can use the Custom option to enter parameter information as key and value pairs and create custom parameters.

In another scenario where we chose the API Key, a process similar to the connection of the data source with Rest Swagger API awaits you. Let's take a closer look at this process.

To use the API Key authentication type in the application, you must enter the information specified below in Rest API:

  • Client ID Key Name,
  • Client ID
  • Client Secret Key Name
  • Client Secret

After defining the data above, you should add a parameter as in Kuika Auth. In the parameter adding process, Kuika creates the value of the Username parameter by default, just like in Kuika Auth. In addition, in cases where you need to add custom parameters, you can use the Custom option to enter the parameter information as key and value pairs and create custom parameters.

After making your authentication type selection and entering the necessary information for the relevant authentication type, you should add an API End Point for Rest API and provide input related to the API End Point details. To select from the added API End Points, you can use the RadioButton on the left.

Using the RadioButton to make your API End Point selection, you should enter the Method, Path, and Name information for the selected API End Point as you can follow in the image above. Then, you can add a new parameter through the Parameters drop-down menu. Click the Add Parameters button to add a new parameter.

For each parameter you added, you must fill in the Name, Value, Location (Path, Header, QueryString), and Type (string, number, integer, boolean, object, array) information.

Click the confirmation (thick) icon after filling in the necessary information for the parameters.

Kuika offers the opportunity to add a Request Object Type for the API End Point you added. For the Request Object Type addition process, click on the Request Object Type drop-down menu. If you have created a Request Object Type before, you can view and make your selection through the drop-down menu in the upcoming menu.

If you haven't created a Request Object Type before, you can start the addition process by clicking the New button in the opened menu.

Assuming you have made an addition in a scenario, enter a name for the new Request Object Type and choose the object type between Object or Array.

Then click the Add Field button to add a field.

For the new Field you added, provide the input for Name, Type (string, number, integer, boolean, object, array), Mapped Type (string, boolean, int32, int64, double, date-time), and Sample Value.

After filling in the information, you can complete the Request Object Type adding process by clicking on the confirmation (thick) icon.

Kuika also offers you the opportunity to add a Response Object Type for the API End Point you added. For the Response Object Type addition process, click on the Response Object Type drop-down menu. If you have created a Response Object Type before, you can view and make your selection through the drop-down menu in the upcoming menu. Also, if you have created a Request Object Type before, you can view and select it through the drop-down menu.

If you haven't created a Response Object Type before, you can create a new Response Object Type by clicking the New button in the opened menu.

For the new Response Object Type you added, enter a name and choose the object type between Object or Array.

Then click the Add Field button to add a field.

For the new Field you added, fill in the Name, Type (string, number, integer, boolean, object, array), Mapped Type (string, boolean, int32, int64, double, date-time), and Sample Value information.

After filling in the information, click on the confirmation (thick) icon and complete the Response Object Type process.

After filling in the required fields, click the Play icon to start the API End Point you created.

After performing all operations, you can create the Datasources connection by clicking the CREATE button in the upper right corner.

Thus, you are ready to establish a connection to the data source with Rest API.

In the next learning content, we will closely examine how to establish a data source connection with C#.

You can quickly connect your existing Rest Swagger API as a data source to an application you are developing. You can use the Datasources module in Kuika to provide this connection.

Before this learning content, we examined the operations of creating a connection to the data source with MSSQL and Rest Swagger API. In this learning content, we will examine the operations that need to be performed during the process of creating a connection to the data source with Rest API.

To make a data source connection with the Rest API, just like any other data source connection, open the Datasources view mode.

Open the new data source creation screen via the Create Datasource button in the Datasource view mode.

In the new data source creation screen, select Rest API, name it, and proceed to the next screen.

In the Rest API screen, you must first define the Service Base URL. In the next step, as in Rest Swagger API, you should select the authentication type and enter the necessary information for the relevant authentication type.

To make an authentication type selection, you can proceed by choosing No Auth, Kuika Auth, and API Key authentication types from the drop-down menu titled Authentication Type according to your Rest API structure.

As we mentioned in the previous learning content, if you choose the No Auth type, you don't need to set up any authentication. If you choose Kuika Auth or if you will authenticate from an existing API, you should select API Key. With the API Key selection, you need to enter the required information.

Similarly, to the previous learning content, if you consider a scenario where you proceed by selecting Kuika Auth, there are some steps you need to follow. In this scenario, you should perform parameter adding operations.

During the parameter addition, Kuika creates a value for the Username parameter by default to simplify the process for you. However, if you need to add custom parameters other than the default Username parameter, you can use the Custom option to enter parameter information as key and value pairs and create custom parameters.

In another scenario where we chose the API Key, a process similar to the connection of the data source with Rest Swagger API awaits you. Let's take a closer look at this process.

To use the API Key authentication type in the application, you must enter the information specified below in Rest API:

  • Client ID Key Name,
  • Client ID
  • Client Secret Key Name
  • Client Secret

After defining the data above, you should add a parameter as in Kuika Auth. In the parameter adding process, Kuika creates the value of the Username parameter by default, just like in Kuika Auth. In addition, in cases where you need to add custom parameters, you can use the Custom option to enter the parameter information as key and value pairs and create custom parameters.

After making your authentication type selection and entering the necessary information for the relevant authentication type, you should add an API End Point for Rest API and provide input related to the API End Point details. To select from the added API End Points, you can use the RadioButton on the left.

Using the RadioButton to make your API End Point selection, you should enter the Method, Path, and Name information for the selected API End Point as you can follow in the image above. Then, you can add a new parameter through the Parameters drop-down menu. Click the Add Parameters button to add a new parameter.

For each parameter you added, you must fill in the Name, Value, Location (Path, Header, QueryString), and Type (string, number, integer, boolean, object, array) information.

Click the confirmation (thick) icon after filling in the necessary information for the parameters.

Kuika offers the opportunity to add a Request Object Type for the API End Point you added. For the Request Object Type addition process, click on the Request Object Type drop-down menu. If you have created a Request Object Type before, you can view and make your selection through the drop-down menu in the upcoming menu.

If you haven't created a Request Object Type before, you can start the addition process by clicking the New button in the opened menu.

Assuming you have made an addition in a scenario, enter a name for the new Request Object Type and choose the object type between Object or Array.

Then click the Add Field button to add a field.

For the new Field you added, provide the input for Name, Type (string, number, integer, boolean, object, array), Mapped Type (string, boolean, int32, int64, double, date-time), and Sample Value.

After filling in the information, you can complete the Request Object Type adding process by clicking on the confirmation (thick) icon.

Kuika also offers you the opportunity to add a Response Object Type for the API End Point you added. For the Response Object Type addition process, click on the Response Object Type drop-down menu. If you have created a Response Object Type before, you can view and make your selection through the drop-down menu in the upcoming menu. Also, if you have created a Request Object Type before, you can view and select it through the drop-down menu.

If you haven't created a Response Object Type before, you can create a new Response Object Type by clicking the New button in the opened menu.

For the new Response Object Type you added, enter a name and choose the object type between Object or Array.

Then click the Add Field button to add a field.

For the new Field you added, fill in the Name, Type (string, number, integer, boolean, object, array), Mapped Type (string, boolean, int32, int64, double, date-time), and Sample Value information.

After filling in the information, click on the confirmation (thick) icon and complete the Response Object Type process.

After filling in the required fields, click the Play icon to start the API End Point you created.

After performing all operations, you can create the Datasources connection by clicking the CREATE button in the upper right corner.

Thus, you are ready to establish a connection to the data source with Rest API.

In the next learning content, we will closely examine how to establish a data source connection with C#.

Yardımcı kaynaklar

Glossary