Webhooks
Cüzdan/ağ için webhook yönetimi. Çağıran, cüzdanın node'una erişime sahip olmalıdır.
Kimlik Doğrulama: Bearer token gereklidir.
Webhook Listele
Endpoint: GET /api/v1/webhooks
Mevcut kullanıcının node'u (ve alt node'ları) için webhook'ları döner.
Sorgu Parametreleri
| Parametre | Tip | Zorunlu | Varsayılan | Açıklama |
|---|---|---|---|---|
| wallet_id | string | Hayır | — | Cüzdan UUID ile filtrele |
| page | int | Hayır | 1 | Sayfa numarası |
| per_page | int | Hayır | 10 | Sayfa başına öğe (max 100) |
Yanıt — 200 OK
Kimlik bilgisi içermeyen items (WebhookResponse), page, per_page, total ile sayfalanmış liste.
Webhook Oluştur
Endpoint: POST /api/v1/webhooks
İstek Gövdesi
| Alan | Tip | Zorunlu | Açıklama |
|---|---|---|---|
| wallet_id | string | Evet | Cüzdan UUID |
| network_id | string | Evet | Network UUID |
| host | string | Evet | max 2048 - Webhook host URL |
| success_path | string | Evet | max 512 - Başarı yönlendirme yolu |
| error_path | string | Evet | max 512 - Hata yönlendirme yolu |
| auth_type | string | Evet | basic veya token |
| auth_basic_username | string | Hayır | auth_type=basic için |
| auth_basic_password | string | Hayır | auth_type=basic için |
| auth_token | string | Hayır | auth_type=token için |
Yanıt — 201 Created
WebhookResponse döner (yanıtta kimlik bilgisi gönderilmez).
| Kod | Açıklama |
|---|---|
| 403 | Cüzdan node'una erişim yok |
| 404 | Cüzdan veya network bulunamadı |
| 409 | Çakışma |
Webhook Güncelle
Endpoint: PUT /api/v1/webhooks
İstek Gövdesi
| Alan | Tip | Zorunlu | Açıklama |
|---|---|---|---|
| id | string | Evet | Webhook UUID |
| host | string | Hayır | max 2048 |
| success_path | string | Hayır | max 512 |
| error_path | string | Hayır | max 512 |
| auth_type | string | Hayır | basic veya token |
| auth_basic_username | string | Hayır | — |
| auth_basic_password | string | Hayır | — |
| auth_token | string | Hayır | — |
Yanıt — 200 OK
Güncellenmiş WebhookResponse döner.
| Kod | Açıklama |
|---|---|
| 403 | Webhook cüzdan node'una erişim yok |
| 404 | Webhook bulunamadı |
Webhook Sil
Endpoint: DELETE /api/v1/webhooks
İstek Gövdesi
{ "id": "550e8400-e29b-41d4-a716-446655440000" }
Yanıt — 204 No Content
| Kod | Açıklama |
|---|---|
| 403 | Webhook cüzdan node'una erişim yok |
| 404 | Webhook bulunamadı |