DB-to-API Designer


You can open your data as REST service, just by typing SQL queries (SELECT, INSERT, UPDATE, DELETE, PROCEDURE) with DB-to-API Designer.

Figure : DB-to-API

Table: DB-to-API Designer

Fields Descriptions
Name Name of API.
Description Description of API.
Database Connection This is the area where the database connection required for API creation is selected.

Database Connection Pool Definition

  • To create a new database connection, click the + button to start the process.

    Figure : Database Connection

Table: Database Conneciton Pool Definition

Fields Descriptions
Name This section is the name that will be given to the database connection.
Description Detailed information about the database connection can be given.
IP/Host IP / Host information of the database to be connected.
DBMS This is the type of database management system.
Port It is the port number on which the database to be connected is running.
Database Connection This is the area where the database connection required for API creation is selected.
Database It is the schema / database name of the database to be connected.
Username Username of the database user.
Password Password of the database password.
Initial Pool Size The number of connections to be made at the time of installation of the database connection to be established.
Min Pool Size The minimum number of connections that can be found in the database connection to be established.
Initial Pool Size The number of connections to be made at the time of installation of the database connection to be established.
Increment Count It is the information of the number of connections that can be added at a time when the connections in the database connection to be installed are exhausted.
Max Statements It is the information of the maximum number of preparedStatement expressions that will be kept per connection in the database connection to be established.

To test the accuracy of the entered values, click Test Connection button to check the accuracy.

  • The authorization section is explained in detail below.

Adding Method

  • Once the database connection is established, the Methods section will be activated. The method can be added by clicking the Add New Method button.
  • Time out value of the query execution can be changed from the Query Timeout field by the users.

    Figure : Define Method

Table: Adding Method

Fields Descriptions
Method Name Name of method.
Description Detailed information about the method.
HTTP Method The method to create a response is the HTTP method.
URL The relative address that can be accessed by the method to be created.
Database Process Type Specifies the type of operation to be used in the SQL query.

By clicking the Process SQL statement button, the results of the SQL statement entered can be checked by clicking the Test SQL statement button after the parameters are automatically found in the SQL statement. Clicking Save button saves the relevant method.

Also by clicking the edit button enables user to edit the SQL statement.

Figure : Sample DB-to-API

Authorization

  • Authorization process is performed on users or user groups from the Authorization screen after the Rest API is created.

Figure: Authorization User

  • The Everyone checkbox is checked to make the same authorization to everyone. Select either Owner, Edit or View.

Figure: Authorization Everyone

  • To authorize only a specific user, the user to be authorized will be added from the list to the page by clicking the + button in Users and one of the Owner, Edit or View options is selected from the Authority column.

Figure: User Selection

Figure: Authorizing Specific User

  • To authorize only a specific user group, the user to be authorized will be added from the list to the page by clicking the + button in the User Groups and selecting one of the Owner, Edit or View options from the Authority column.

Figure: User Group Selection

Resim:Figure: Authorizing Specific User Group

  • After all definitions are set you can save your definitions from the bottom button group.
  • Any time in the future you can make changes and click Apply Changes button in order to save your changes in the Gateway as well.

Figure : Define Method