Native SQL Statements
Supports SELECT, INSERT, UPDATE, DELETE, PROCEDURE, BATCH INSERT, TRUNCATE operations.
NoSQL Operations
Provides FIND operation type support.
Stored Procedure
Provides Stored Procedure calling support.
Cursor Support
Can return cursor result.
Batch Operations
Provides batch operation support.
CRUD Operations
Supports all CRUD operations.
Creating New DB-2-API
1
Go to DB-2-API Page from Menu
Development → API Creator → DB-2-API item is selected in the main menu.
2
Create New API
The +Create button at the top right of the opened interface is clicked.

3
Fill API Information
Required fields for the new API to be created are filled and the →Save and Next button at the top right is clicked, starting the API creation process.

Endpoint Creation
1
Add Endpoint
Method/Endpoint is added to the API by clicking the Add button on the screen that appears.

2
Fill Endpoint Information
Fields in the Method/Endpoint definition screen are filled and the Save button is clicked.

Basic Information
Basic Information
HTTP Method
Field: HTTP MethodHTTP Method is selected for REST APIs: GET, POST, PUT, HEAD, OPTIONS, DELETE, PATCH, TRACE, ALL
Name/URL
Field: Name/URLThe name given to Method/Endpoint by the user. This name appears in interfaces.
Description
Field: DescriptionDefinition information of Method/Endpoint.
Database Connection
Database Connection
Connection Pool
Field: Connection Pool DescriptionInformation about the Database connection where queries will be executed.
Query Timeout
Field: TimeoutTimeout value in seconds for query execution.
SQL Operations
SQL Operations
SQL Statement Type
Field: Type of SQL StatementSQL Statement type information: SELECT, UPDATE, INSERT, DELETE, PROCEDURE, TRUNCATE, BATCH INSERT
SQL Statement
Field: SQLThe SQL statement to be executed. Parameters must be written with a colon (Here
:) prefix without spaces to be definable.Example query::fName is a parameter and is sent by the user making a request to the API.NoSQL Operations
NoSQL Operations
Operation Type
Field: Operation TypeNoSQL operation type information: FIND
Query
Field: QueryThe query to be executed. Parameters are enclosed in double curly braces to be definable.Example query:Here
{{username}} is a parameter and is sent by the user making a request to the API.Parameters
Parameters
Parameters
Field: ParametersIf there is a parameter like
:fName in your SQL Query, the Parameters table opens. Here the parameter’s:- Data Type
- Format
- Repetition Type
- Parameter Type
- Example Values
Then by clicking the Try button, the “Response Message Example” comes according to this data.
Testing SQL
It may be desired to see what result will be obtained when a request is sent to the endpoint. If the query to be executed for the endpoint has parameters, test data (Test Value) is entered and the Try It button is pressed. The template returned as the test result is the Response object that is stable in Apinizer. If there are multiple records matching the query, only the first record is given in the example response.
If a null value is desired to be sent for testing, it is sufficient to write null as the parameter.
Creating API Proxy from DB-2-API
When there is at least one Method/Endpoint, an API Proxy is created for DB-2-API by clicking the Create API Proxy button. The API Proxy is created by entering the required fields for the API Proxy on the screen that appears and clicking the Save button.
You can create multiple API Proxies from one DB-2-API.
Deploy/Redeploy
To view and manage API Proxies in DB-2-API, click the Manage API Proxies link and they are viewed and managed from the opened window. In the opened window, Deploy/Undeploy and Redeploy operations for API Proxies created with DB-2-API are performed in this section. To deploy the API Proxy, click the Manage API Proxies link and press the deploy icon.







