Distributor Oluştur
Bir node için yeni bir distributor oluşturun.
Endpoint: POST /api/v1/integration/distributors/nodes/{node_id}
Kimlik Doğrulama: Gerekli (Bearer token)
Gerekli Header'lar:
Authorization: Bearer <access_token>
X-Target-Server: integration
Yol Parametreleri
| Parametre | Tip | Gerekli | Açıklama |
|---|---|---|---|
node_id | string (UUID) | Evet | Node ID |
İstek Gövdesi
{
"meta": {
"host": "https://example.com",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user",
"password": "pass"
}
}
}
İstek Parametreleri
| Alan | Tip | Gerekli | Açıklama |
|---|---|---|---|
meta | object | Hayır | Webhook yapılandırması (opsiyonel) |
meta.host | string | Hayır | Webhook host URL'i (meta verilmişse gerekli) |
meta.path | string | Hayır | Webhook path'i (meta verilmişse gerekli) |
meta.method | integer | Hayır | HTTP metodu (1=GET, 2=POST, vb.) |
meta.authentication | object | Hayır | Kimlik doğrulama yapılandırması |
meta.authentication.type | integer | Hayır | Kimlik doğrulama tipi (1=Basic, 2=Token) |
meta.authentication.username | string | Hayır | Kullanıcı adı (type=1 ise gerekli) |
meta.authentication.password | string | Hayır | Şifre (type=1 ise gerekli) |
Not: meta alanı opsiyoneldir. Distributor'ı webhook yapılandırması ile veya webhook olmadan oluşturabilirsiniz.
Yanıt
Durum: 201 Created
Oluşturulan distributor nesnesini döndürür.
{
"id": "39e8003c-6342-4fd3-97a1-3f2a7b437d0a",
"node_id": "e40efce4-38a3-46c4-a202-e8db95d0409c",
"meta": {
"host": "https://example.com",
"path": "/webhook",
"method": "GET",
"authentication": {
"type": 1,
"username": "user",
"password": "pass"
}
},
"created_at": "2025-12-24T02:16:10.419696+03:00",
"updated_at": "2025-12-24T02:16:10.419696+03:00"
}
Örnek cURL İsteği
curl -X POST 'https://<base-url>/api/v1/integration/distributors/nodes/e40efce4-38a3-46c4-a202-e8db95d0409c' \
-H "Content-Type: application/json" \
-H "X-Target-Server: integration" \
-H "Authorization: Bearer <access_token>" \
-d '{
"meta": {
"host": "https://example.com",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user",
"password": "pass"
}
}
}'