DB-2-API: Batch Insert Usage
In this scenario, Batch Insert usage on DB-2-API in Apinizer Platform will be explained.
To get more information about creating DB-2-API, click here.
1. Creating DB-2-API
An API that manages employee records is desired to be created.
The name and description fields of DB-2-API are filled and the Save and Next button is clicked.
Visual containing DB-2-API settings is provided below:
When DB-2-API is created, API and method information is on the left panel, and definition information of the relevant method is on the right side.
2. Creating Method
Click the Add button to open the method/endpoint creation panel.
Visual containing method creation settings is provided below:
After writing the query statement, necessary parameters are entered and example usage can be seen by pressing Show Sample Message Body.
Visual containing sample message body is provided below:
As seen in the sample message body, in Batch Insert usage, data must be entered as a JSON list.
3. Viewing API Definition Documents
Click the Show Specs link to access the API definition files belonging to Employee Db-2-API.
Visual containing Spec Information dialog is provided below:
4. Creating API Proxy
An API Proxy can be created instantly by clicking the Create API Proxy button from the DB-2-API screen.
When creating the API Proxy, fill in the input fields shown in the visual below and click the Save button.
4.1 Going Live with API Proxy
Employee API Proxy can be quickly loaded (deployed) onto the defined environment and opened for client consumption.
This operation can be managed through the dialog opened by clicking the Deploy button on the API Proxy screen.
5. Testing
A JSON list is sent as Body type for testing.
When the parameters expected by the relevant method are added to the request as Body type and sent, the following successful response is returned.
