{"openapi":"3.0.3","info":{"title":"Modelen Portal API","version":"1.0.0","x-en":"Modelen Portal API","description":"Koordinatörlerin Modelen portalına programatik erişimi: başvuru ve profil yönetimi, nabız ve adres doğrulama, herkese açık koordinatör dizini."},"servers":[{"url":"https://modelen.tr/api/v1"}],"components":{"securitySchemes":{"anahtar":{"type":"http","scheme":"bearer","description":"Panel > API anahtarları sayfasından oluşturulan `mdl_...` anahtarı"}},"schemas":{"Hata":{"type":"object","properties":{"hata":{"type":"string"},"kod":{"type":"string"}},"required":["hata","kod"]},"Koordinatorum":{"type":"object","properties":{"slug":{"type":"string"},"ad":{"type":"string","minLength":2,"maxLength":60,"description":"Proje / koordinatör adı"},"kisa":{"type":"string","minLength":10,"maxLength":200,"description":"Listelerde görünen kısa açıklama"},"ayrinti":{"type":"string","maxLength":5000,"description":"Herkese açık ayrıntılı açıklama (düz metin)"},"baglanti":{"type":"string","format":"uri","maxLength":200,"description":"Web sitesi ya da depo (http/https)"},"adres":{"type":"string","format":"uri","maxLength":200,"description":"Koordinatör adresi (https); boş olabilir"},"hf":{"type":"string","format":"uri","maxLength":200,"description":"Hugging Face bağlantısı (huggingface.co / hf.co)"},"iletisim":{"type":"string","format":"email","maxLength":120,"description":"Yalnızca yöneticilere görünen iletişim e-postası"},"durum":{"type":"string","enum":["beklemede","onaylandi","reddedildi","askida"]},"yonetici_notu":{"type":"string"},"taslak_var":{"type":"boolean","description":"Onaylı profilde onay bekleyen düzenleme var"},"adres_dogrulandi":{"type":"boolean"},"gorsel_sayisi":{"type":"integer"},"sayfa":{"type":"string","format":"uri","nullable":true,"description":"Onaylıysa herkese açık sayfa"},"nabiz":{"$ref":"#/components/schemas/NabizDurumu"}}},"KoordinatorGirdisi":{"type":"object","properties":{"ad":{"type":"string","minLength":2,"maxLength":60,"description":"Proje / koordinatör adı"},"kisa":{"type":"string","minLength":10,"maxLength":200,"description":"Listelerde görünen kısa açıklama"},"ayrinti":{"type":"string","maxLength":5000,"description":"Herkese açık ayrıntılı açıklama (düz metin)"},"baglanti":{"type":"string","format":"uri","maxLength":200,"description":"Web sitesi ya da depo (http/https)"},"adres":{"type":"string","format":"uri","maxLength":200,"description":"Koordinatör adresi (https); boş olabilir"},"hf":{"type":"string","format":"uri","maxLength":200,"description":"Hugging Face bağlantısı (huggingface.co / hf.co)"},"iletisim":{"type":"string","format":"email","maxLength":120,"description":"Yalnızca yöneticilere görünen iletişim e-postası"}},"additionalProperties":false},"Nabiz":{"type":"object","required":["durum"],"additionalProperties":false,"properties":{"durum":{"type":"string","enum":["calisiyor","bekliyor","bakimda","durdu"]},"tur":{"type":"integer","minimum":0},"toplam_tur":{"type":"integer","minimum":0},"aktif_isci":{"type":"integer","minimum":0},"protokol":{"type":"string","maxLength":10,"example":"1"},"surum":{"type":"string","maxLength":30},"mesaj":{"type":"string","maxLength":120}}},"NabizDurumu":{"type":"object","nullable":true,"properties":{"durum":{"type":"string","enum":["cevrimici","gecikmeli","bakimda","durdu","bilinmiyor"]},"son_gorulme":{"type":"integer","nullable":true,"description":"Unix zamanı (sn)"},"tur":{"type":"integer","nullable":true},"toplam_tur":{"type":"integer","nullable":true},"aktif_isci":{"type":"integer","nullable":true}}},"KoordinatorOzet":{"type":"object","properties":{"slug":{"type":"string"},"ad":{"type":"string"},"aciklama":{"type":"string"},"adres":{"type":"string","nullable":true},"adres_dogrulandi":{"type":"boolean"},"hf":{"type":"string","nullable":true},"baglanti":{"type":"string","nullable":true},"nabiz":{"$ref":"#/components/schemas/NabizDurumu"},"sayfa":{"type":"string","format":"uri"}}},"AdresDogrulama":{"type":"object","properties":{"adres":{"type":"string"},"dosya":{"type":"string","format":"uri","description":"Bu adreste yayınlanmalı"},"icerik":{"type":"string","description":"Dosyanın tek satırlık içeriği"}}}}},"paths":{"/saglik":{"get":{"summary":"Sağlık denetimi","x-en":"Health check","tags":["Genel"],"security":[],"responses":{"200":{"description":"Servis ayakta","content":{"application/json":{"schema":{"type":"object","properties":{"durum":{"type":"string","example":"tamam"},"zaman":{"type":"integer"}}}}}}}}},"/koordinatorler":{"get":{"summary":"Onaylı koordinatörleri listele","x-en":"List approved coordinators","tags":["Herkese açık"],"security":[],"description":"Yalnızca yöneticilerin onayladığı koordinatörler. 60 sn önbelleğe alınabilir. CORS açık.","responses":{"200":{"description":"Liste","content":{"application/json":{"schema":{"type":"object","properties":{"surum":{"type":"integer"},"guncelleme":{"type":"string"},"koordinatorler":{"type":"array","items":{"$ref":"#/components/schemas/KoordinatorOzet"}}}}}}}}}},"/koordinatorler/{slug}":{"get":{"summary":"Bir koordinatörün herkese açık ayrıntısı","x-en":"Public details of a coordinator","tags":["Herkese açık"],"security":[],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Koordinatör","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KoordinatorOzet"}}}},"404":{"description":"Yok ya da onaylı değil","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}}}}},"/ben":{"get":{"summary":"Anahtar sahibi hesap","x-en":"Account of the key owner","tags":["Hesap"],"security":[{"anahtar":[]}],"responses":{"200":{"description":"Hesap","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"ad":{"type":"string"},"eposta":{"type":"string"},"eposta_dogrulandi":{"type":"boolean"},"rol":{"type":"string"},"koordinator":{"type":"object","nullable":true,"properties":{"slug":{"type":"string"},"ad":{"type":"string"},"durum":{"type":"string"}}}}}}}},"401":{"description":"Anahtar yok ya da geçersiz","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"429":{"description":"Hız sınırı aşıldı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}}}}},"/koordinator":{"get":{"summary":"Kendi koordinatör kaydım","x-en":"My coordinator record","tags":["Koordinatör"],"security":[{"anahtar":[]}],"responses":{"200":{"description":"Kayıt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Koordinatorum"}}}},"404":{"description":"Başvuru yok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"401":{"description":"Anahtar yok ya da geçersiz","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"429":{"description":"Hız sınırı aşıldı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}}}},"post":{"summary":"Koordinatör başvurusu oluştur","x-en":"Create a coordinator application","tags":["Koordinatör"],"security":[{"anahtar":[]}],"description":"E-posta doğrulanmış olmalı. `ad` ve `kisa` zorunlu. Başvuru yönetici onayına düşer.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KoordinatorGirdisi"}}}},"responses":{"201":{"description":"Oluşturuldu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Koordinatorum"}}}},"400":{"description":"Doğrulama hatası","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"403":{"description":"E-posta doğrulanmamış","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"409":{"description":"Zaten başvuru var","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"401":{"description":"Anahtar yok ya da geçersiz","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"429":{"description":"Hız sınırı aşıldı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}}}},"patch":{"summary":"Koordinatör bilgilerini güncelle","x-en":"Update coordinator details","tags":["Koordinatör"],"security":[{"anahtar":[]}],"description":"Yalnızca gönderilen alanlar değişir. İncelemedeki/reddedilmiş başvuruda doğrudan, **onaylı** profilde taslak olarak kaydedilir ve yönetici onayından sonra yayına girer (202). Adres değişirse doğrulama sıfırlanır.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KoordinatorGirdisi"}}}},"responses":{"200":{"description":"Güncellendi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Koordinatorum"}}}},"202":{"description":"Taslak olarak kaydedildi (onay bekliyor)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Koordinatorum"}}}},"400":{"description":"Doğrulama hatası","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"404":{"description":"Başvuru yok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"409":{"description":"Askıda","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"401":{"description":"Anahtar yok ya da geçersiz","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"429":{"description":"Hız sınırı aşıldı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}}}}},"/koordinator/nabiz":{"post":{"summary":"Nabız (çalışıyorum) bildirimi","x-en":"Heartbeat","tags":["Koordinatör"],"security":[{"anahtar":[]}],"description":"Onaylı koordinatörler en geç 15 dakikada bir göndermelidir; herkese açık sayfada \"çevrimiçi\" görünürsünüz. En çok dakikada 6 istek.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Nabiz"}}}},"responses":{"200":{"description":"Kaydedildi"},"400":{"description":"Geçersiz gövde","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"403":{"description":"Onaylı koordinatör değil","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"401":{"description":"Anahtar yok ya da geçersiz","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"429":{"description":"Hız sınırı aşıldı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}}}}},"/koordinator/adres-dogrula":{"post":{"summary":"Adres doğrulamasını başlat","x-en":"Start address verification","tags":["Koordinatör"],"security":[{"anahtar":[]}],"description":"Adresinizi kontrol ettiğinizi kanıtlamak için döndürülen içeriği `/.well-known/modelen-dogrulama.txt` yoluyla yayınlayın, sonra `/kontrol` uç noktasını çağırın.","responses":{"200":{"description":"Talimat","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdresDogrulama"}}}},"400":{"description":"Adres yok ya da https değil","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"404":{"description":"Başvuru yok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"401":{"description":"Anahtar yok ya da geçersiz","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"429":{"description":"Hız sınırı aşıldı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}}}}},"/koordinator/adres-dogrula/kontrol":{"post":{"summary":"Adres doğrulamasını kontrol et","x-en":"Check address verification","tags":["Koordinatör"],"security":[{"anahtar":[]}],"description":"Portal adresinizi (yalnızca genel internetteki https adreslerini) okur ve içeriği karşılaştırır. 10 dakikada en çok 10 deneme.","responses":{"200":{"description":"Doğrulandı","content":{"application/json":{"schema":{"type":"object","properties":{"adres_dogrulandi":{"type":"boolean"}}}}}},"422":{"description":"Dosya yok ya da içerik uyuşmuyor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"400":{"description":"Önce doğrulamayı başlatın","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"401":{"description":"Anahtar yok ya da geçersiz","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}},"429":{"description":"Hız sınırı aşıldı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hata"}}}}}}}}}