> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DB-2-API: Select Usage

> Provides Select usage on DB-2-API in Apinizer Platform. You can perform data reading operations from the database and publish SQL SELECT queries as REST API endpoints.

To get more information about creating DB-2-API, [click here](/en/develop/api-proxy-creation/api-creator-db-api-creation).

## 1. Creating DB-2-API

An API Proxy 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:**

<img src="https://mintcdn.com/apinizer/fqbOQLWmkDS-ohXx/images/tutorials/api-olusturucu-senaryolari/db2api-select/01-db2api-settings.png?fit=max&auto=format&n=fqbOQLWmkDS-ohXx&q=85&s=7d4b97b0df1a8eb7c7693c5da89c9dcc" alt="DB-2-API Settings" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-select/01-db2api-settings.png" />

When DB-2-API is created, API and endpoint information is on the left panel, and definition information of the selected method is on the right side.

<img src="https://mintcdn.com/apinizer/fqbOQLWmkDS-ohXx/images/tutorials/api-olusturucu-senaryolari/db2api-select/02-db2api-created.png?fit=max&auto=format&n=fqbOQLWmkDS-ohXx&q=85&s=fe86acb225d97b73aad157f51417a6b5" alt="DB-2-API Created" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-select/02-db2api-created.png" />

## 2. Creating Endpoint

Click the **Add** button to open the method/endpoint creation panel.

<img src="https://mintcdn.com/apinizer/fqbOQLWmkDS-ohXx/images/tutorials/api-olusturucu-senaryolari/db2api-select/03-add-endpoint.png?fit=max&auto=format&n=fqbOQLWmkDS-ohXx&q=85&s=510d930b8818cc11cf527df190112f98" alt="Adding Endpoint" width="400" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-select/03-add-endpoint.png" />

**Visual containing method creation settings is provided below:**

<img src="https://mintcdn.com/apinizer/fqbOQLWmkDS-ohXx/images/tutorials/api-olusturucu-senaryolari/db2api-select/04-method-creation-settings.png?fit=max&auto=format&n=fqbOQLWmkDS-ohXx&q=85&s=b9fdaaf326558d55766f1466e285e44c" alt="Method Creation Settings" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-select/04-method-creation-settings.png" />

**Visual containing the message returned as test result is provided below:**

<img src="https://mintcdn.com/apinizer/fqbOQLWmkDS-ohXx/images/tutorials/api-olusturucu-senaryolari/db2api-select/05-test-result.png?fit=max&auto=format&n=fqbOQLWmkDS-ohXx&q=85&s=03ea10f45daca45aaacaa3bdc143389b" alt="Test Result" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-select/05-test-result.png" />

## 3. Viewing API Definition Documents

Click the **Show Specs** link to access the API definition files belonging to Employee Db-2-API.

<img src="https://mintcdn.com/apinizer/fqbOQLWmkDS-ohXx/images/tutorials/api-olusturucu-senaryolari/db2api-select/06-show-specs.png?fit=max&auto=format&n=fqbOQLWmkDS-ohXx&q=85&s=9c53cc1b1a07f8711a474d5e40d67b75" alt="Show Specs" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-select/06-show-specs.png" />

**Visual containing Spec Information dialog is provided below:**

<img src="https://mintcdn.com/apinizer/fqbOQLWmkDS-ohXx/images/tutorials/api-olusturucu-senaryolari/db2api-select/07-spec-info.png?fit=max&auto=format&n=fqbOQLWmkDS-ohXx&q=85&s=9eff61c2e89cbd59383fd7a258cee534" alt="Spec Information" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-select/07-spec-info.png" />

## 4. Creating API Proxy

An API Proxy can be created instantly by clicking the **Create API Proxy** button from the DB-2-API screen.

<img src="https://mintcdn.com/apinizer/fqbOQLWmkDS-ohXx/images/tutorials/api-olusturucu-senaryolari/db2api-select/08-create-api-proxy.png?fit=max&auto=format&n=fqbOQLWmkDS-ohXx&q=85&s=81d71b80e7dc50b05da532738b389748" alt="Create API Proxy" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-select/08-create-api-proxy.png" />

When creating the API Proxy, fill in the required fields shown in the visual below and click the **Save** button.

<img src="https://mintcdn.com/apinizer/fqbOQLWmkDS-ohXx/images/tutorials/api-olusturucu-senaryolari/db2api-select/09-api-proxy-creation-form.png?fit=max&auto=format&n=fqbOQLWmkDS-ohXx&q=85&s=341550d15f3cc5d9239a4e2e4a466ab8" alt="API Proxy Creation Form" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-select/09-api-proxy-creation-form.png" />

### 4.1 Going Live with API Proxy

Employee API Proxy can be quickly loaded 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.

<img src="https://mintcdn.com/apinizer/fqbOQLWmkDS-ohXx/images/tutorials/api-olusturucu-senaryolari/db2api-select/10-deploy-dialog.png?fit=max&auto=format&n=fqbOQLWmkDS-ohXx&q=85&s=e131398f1b3d11b93ea275652269a54c" alt="Deploy Dialog" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-select/10-deploy-dialog.png" />

## 5. Testing

When a request is sent to the **"getPersonByName" method** with the relevant parameter, the following response is returned.

<img src="https://mintcdn.com/apinizer/fqbOQLWmkDS-ohXx/images/tutorials/api-olusturucu-senaryolari/db2api-select/11-test-result-final.png?fit=max&auto=format&n=fqbOQLWmkDS-ohXx&q=85&s=272eff5ff49452fcf3f05190526e12b2" alt="Test Result" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-select/11-test-result-final.png" />
