> ## 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: Update Usage

> Enables using Update on DB-2-API in the Apinizer Platform. You can perform update operations on existing records in the database and publish SQL UPDATE queries as REST API endpoints.

This scenario explains **Update** usage on DB-2-API in the Apinizer Platform.

For 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 is to be created to manage employee records.

Fill in the DB-2-API name and description fields, then click the **Save and Next** button.

**The image below shows DB-2-API settings:**

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

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

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

## 2. Creating Methods

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

<img src="https://mintcdn.com/apinizer/M61C9PJufP-6cUi-/images/tutorials/api-olusturucu-senaryolari/db2api-update/03-add-endpoint.png?fit=max&auto=format&n=M61C9PJufP-6cUi-&q=85&s=003af672f4146725c018045cb2cf4270" alt="Adding Endpoint" width="400" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/03-add-endpoint.png" />

**The image below shows method creation settings:**

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

After entering the required parameters, you can test the written query with the **Try It** button.

<img src="https://mintcdn.com/apinizer/M61C9PJufP-6cUi-/images/tutorials/api-olusturucu-senaryolari/db2api-update/05-try-it-button.png?fit=max&auto=format&n=M61C9PJufP-6cUi-&q=85&s=79253b700effa77f454255701f185328" alt="Try It Button" width="600" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/05-try-it-button.png" />

**The image below shows the test result message:**

<img src="https://mintcdn.com/apinizer/M61C9PJufP-6cUi-/images/tutorials/api-olusturucu-senaryolari/db2api-update/06-test-result.png?fit=max&auto=format&n=M61C9PJufP-6cUi-&q=85&s=7d028e2e9b3077999894664a995da838" alt="Test Result" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/06-test-result.png" />

## 3. Viewing API Definition Documents

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

<img src="https://mintcdn.com/apinizer/M61C9PJufP-6cUi-/images/tutorials/api-olusturucu-senaryolari/db2api-update/07-show-specs.png?fit=max&auto=format&n=M61C9PJufP-6cUi-&q=85&s=711ef38d6f27d6eb87af88aacd9b85e1" alt="Show Specs" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/07-show-specs.png" />

**The image below shows the Spec Information dialog:**

<img src="https://mintcdn.com/apinizer/M61C9PJufP-6cUi-/images/tutorials/api-olusturucu-senaryolari/db2api-update/08-spec-info.png?fit=max&auto=format&n=M61C9PJufP-6cUi-&q=85&s=a1c4f71140af9dc733971869ffa5c925" alt="Spec Information" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/08-spec-info.png" />

## 4. Creating API Proxy

You can instantly create an API Proxy by clicking the **Create API Proxy** button from the DB-2-API screen.

<img src="https://mintcdn.com/apinizer/M61C9PJufP-6cUi-/images/tutorials/api-olusturucu-senaryolari/db2api-update/09-create-api-proxy.png?fit=max&auto=format&n=M61C9PJufP-6cUi-&q=85&s=572116c15051a5ca5ca77ab89e7348b3" alt="Create API Proxy" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/09-create-api-proxy.png" />

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

<img src="https://mintcdn.com/apinizer/M61C9PJufP-6cUi-/images/tutorials/api-olusturucu-senaryolari/db2api-update/10-api-proxy-creation-form.png?fit=max&auto=format&n=M61C9PJufP-6cUi-&q=85&s=0102494f1fcc3832b0a712be5867810e" alt="API Proxy Creation Form" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/10-api-proxy-creation-form.png" />

### 4.1 Deploying the API Proxy

Employee API Proxy can be quickly deployed to a defined environment and made available for client consumption.

This operation can be managed through the dialog opened by the **Deploy** button on the API Proxy screen.

<img src="https://mintcdn.com/apinizer/M61C9PJufP-6cUi-/images/tutorials/api-olusturucu-senaryolari/db2api-update/11-deploy-dialog.png?fit=max&auto=format&n=M61C9PJufP-6cUi-&q=85&s=c189c6a7c668af5c837203395faa64f7" alt="Deploy Dialog" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/11-deploy-dialog.png" />

## 5. Testing

When sent without adding the parameters expected by the relevant method, the following error response is returned.

<img src="https://mintcdn.com/apinizer/M61C9PJufP-6cUi-/images/tutorials/api-olusturucu-senaryolari/db2api-update/12-error-response.png?fit=max&auto=format&n=M61C9PJufP-6cUi-&q=85&s=3201efa72edb76159ada5763d2a18dd1" alt="Error Response" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/12-error-response.png" />

When the parameters expected by the relevant method are added to the request and executed, the following response is returned.

<img src="https://mintcdn.com/apinizer/M61C9PJufP-6cUi-/images/tutorials/api-olusturucu-senaryolari/db2api-update/13-success-response.png?fit=max&auto=format&n=M61C9PJufP-6cUi-&q=85&s=60f573dfc85b825136b170bbedc63a83" alt="Success Response" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/13-success-response.png" />
