API: Webhook Deploy

Custom projelerde image tag göndererek pipeline tetikleme.

Bu endpoint yalnızca özel entegrasyon platformları ile oluşturulan custom projeler içindir. Webhook çağrısı güvenlik kontrollerinden geçtikten sonra pipeline asenkron tetiklenir.

Endpoint

/api/webhooks/deploy

Method

POST

Headers

  • Authorization: KSK <base64-authorization>
  • X-KASNAK-SIGNATURE: authorization içinde üretilen signature ile aynı olmalıdır.
  • Content-Type: application/json

Payload

  • projectId (zorunlu): hedef proje id.
  • imageTag (opsiyonel): runtime nexus_image_tag değerine yazılır.

Örnek Request

POST /api/webhooks/deploy
Authorization: KSK <base64(apiKey:...&randomKey:...&signature:...)>
X-KASNAK-SIGNATURE: <signature>
Content-Type: application/json

{"projectId":"cxxxxxxxxxxxxxxxxxxxxxxxx","imageTag":"1.2.3"}

Örnek Response

200 OK

{
  "success": true,
  "projectId": "cxxxxxxxxxxxxxxxxxxxxxxxx",
  "imageTag": "1.2.3"
}

Hata Response'ları

  • 400 - Geçersiz/missing body (örn: projectId is required, Invalid JSON body)
  • 401 - Authorization veya signature doğrulama hatası
  • 403 - Tenant/platform uyuşmazlığı veya custom olmayan proje
  • 404 - Proje bulunamadı
  • 405 - Method uygun değil (sadece POST)
  • 409 - Pipeline tetikleme için kaynak/buildability koşulları sağlanmadı