> ## 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 Kullanımı

> Apinizer Platformu'nda DB-2-API üzerinde Update kullanımını sağlar. Veritabanında mevcut kayıtları güncelleme işlemlerini gerçekleştirebilir, SQL UPDATE sorgularını REST API endpoint'leri olarak yayınlayabilir.

Bu senaryoda Apinizer Platformu'nda DB-2-API üzerinde **Update** kullanımı anlatılacaktır.

DB-2-API oluşturmak hakkında daha fazla bilgi almak için [tıklayınız](/tr/develop/api-proxy-olusturma/api-creator-db-api-olusturma).

## 1. DB-2-API Oluşturma

Çalışan kayıtlarının yönetildiği bir API oluşturulmak istenmektedir.

DB-2-API'nin ad ve açıklama alanları doldurulup **Kaydet ve İlerle (Save and Next)** butonuna tıklanır.

**DB-2-API ayarlarını içeren görsele aşağıda yer verilmiştir:**

<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 Ayarları" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/01-db2api-settings.png" />

DB-2-API oluşturulduğunda sol panelde API ve metot bilgileri, sağ tarafta ise seçili metodun tanım bilgileri yer alır.

<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 Oluşturuldu" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/02-db2api-created.png" />

## 2. Metot Oluşturma

**Ekle (Add)** butonuna tıklayarak metot/endpoint oluşturma paneli açılır.

<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="Endpoint Ekleme" width="400" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/03-add-endpoint.png" />

**Metot oluşturma ayarlarını içeren görsele aşağıda yer verilmiştir:**

<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="Metot Oluşturma Ayarları" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/04-method-creation-settings.png" />

Gerekli parametreler girilip **Dene (Try It)** butonu ile yazılan sorgu denenebilir.

<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 Butonu" width="600" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/05-try-it-button.png" />

**Test sonucu dönen mesajı içeren görsele aşağıda yer verilmiştir:**

<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 Sonucu" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/06-test-result.png" />

## 3. API Tanım Belgelerini Görüntüleme

Employee Db-2-API'ye ait API tanım dosyalarına erişmek için **Spec'leri Göster (Show Specs)** linkine tıklanır.

<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="Spec'leri Göster" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/07-show-specs.png" />

**Spec Bilgisi diyaloğunu içeren görsele aşağıda yer verilmiştir:**

<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 Bilgisi" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/08-spec-info.png" />

## 4. API Proxy Oluşturma

DB-2-API ekranından **API Proxy Oluştur (Create API Proxy)** butonuna tıklanarak anında API Proxy oluşturulabilir.

<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="API Proxy Oluştur" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/09-create-api-proxy.png" />

API Proxy'i oluştururken aşağıdaki görselde bulunan alanlar doldurularak **Kaydet (Save)** butonuna tıklanır.

<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 Oluşturma Formu" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/10-api-proxy-creation-form.png" />

### 4.1 API Proxy'yi Canlıya Alma

Employee API Proxy, tanımı yapılmış ortam (environment) üzerine hızlı bir şekilde yüklenip (deploy), istemcilerin tüketimine açılabilir.

Bu işlemin yönetimi API Proxy ekranındaki **Yükle (Deploy)** butonuyla açılan diyalog üzerinden gerçekleştirilebilir.

<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. Test Etme

İlgili metodun beklediği parametreler eklenmeden gönderildiğinde aşağıdaki hata veren yanıt dönmektedir.

<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="Hata Yanıtı" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/12-error-response.png" />

İlgili metodun beklediği parametreler isteğe eklenip çalıştırıldığında aşağıdaki yanıt dönmektedir.

<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="Başarılı Yanıt" width="800" data-path="images/tutorials/api-olusturucu-senaryolari/db2api-update/13-success-response.png" />
