Platform Servisi

Stabil

Merkezi yapılandırma otoritesi. Projeler, domainler, servis ayarları ve auth kuralları bu servis üzerinden yönetilir.

Stabil/api/platform/*

Platform servisi; proje oluşturma, proje listeleme, domain bağlama, domain resolve etme, servis ayarlarını yönetme ve auth ayarlarını düzenleme işlemlerinin tamamını merkezi olarak sağlar.

Genel Bakış

Platform Servisi, EVDSOFT mikro servis mimarisinin merkezinde yer alır. Her proje önce burada tanımlanır; ardından o projeye domainler, servis aktivasyonları ve auth kuralları bağlanır. Böylece diğer servisler domain veya proje bazlı çalışmak için gerekli yapılandırmayı bu servis üzerinden alabilir.

Servis Özeti

Base Pattern

/api/platform/*

Auth Header

X-PLATFORM-KEY

Sorumluluklar

Proje Yönetimi

Projeleri oluşturur, listeler, tekil getirir, slug ile bulur, günceller ve siler.

Domain Yönetimi

Projeye bağlı domain kayıtlarını ekler, listeler ve günceller.

Domain Resolve

Bir domain üzerinden proje, eşleşen domain, servis ayarları ve auth ayarlarını tek istekte çözer.

Servis Ayarları

Auth, Mail, SMS ve Audit servislerinin proje bazlı aktivasyonunu yönetir.

Auth Ayarları

Kayıt modu, doğrulama zorunlulukları, onay akışları ve 2FA kurallarını yönetir.

Kimlik Doğrulama

GET /api/platform/health dışında koleksiyondaki tüm endpoint örneklerinde X-PLATFORM-KEY header'ı kullanılıyor. Health endpoint'i ise header gerektirmeden servis durumunu döndürüyor.

Not

Platform servisinde standart yanıt yapısı genel olaraksuccess,message,data vetimestamp alanlarından oluşuyor.

API Endpoint'leri

Health Check

GET/api/platform/health

Servisin çalıştığını doğrular. Kimlik doğrulama gerektirmez.

Yanıt Örneği

JSON
{
  "data": {
    "service": "platform-service"
  },
  "message": "Platform servisi çalışıyor.",
  "success": true,
  "timestamp": "2026-03-06T11:13:25.7716176"
}

Proje Yönetimi

POST/api/platform/projects

Yeni proje oluşturur.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet
Content-Typeapplication/jsonEvet

İstek Örneği

Terminal
{
  "name": "E-Sentinel",
  "slug": "esentinel",
  "description": "SEO ve crawl yönetim platformu"
}

Yanıt Örneği

JSON
{
  "data": {
    "createdAt": "2026-03-06T11:14:02.3040421",
    "description": "SEO ve crawl yönetim platformu",
    "id": 4,
    "name": "E-Sentinel",
    "slug": "esentinel",
    "status": "DRAFT",
    "updatedAt": "2026-03-06T11:14:02.3040421",
    "uuid": "3b148de8-a940-4895-83a5-de8e022280f1"
  },
  "message": "Proje başarıyla oluşturuldu.",
  "success": true,
  "timestamp": "2026-03-06T11:14:02.3188826"
}
GET/api/platform/projects

Tüm projeleri listeler.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet

Yanıt Örneği

JSON
{
  "data": [
    {
      "createdAt": "2026-03-06T11:14:02.304042",
      "description": "SEO ve crawl yönetim platformu",
      "id": 4,
      "name": "E-Sentinel",
      "slug": "esentinel",
      "status": "DRAFT",
      "updatedAt": "2026-03-06T11:14:02.304042",
      "uuid": "3b148de8-a940-4895-83a5-de8e022280f1"
    }
  ],
  "message": "Projeler listelendi.",
  "success": true,
  "timestamp": "2026-03-06T11:14:08.5877954"
}
GET/api/platform/projects/{id}

ID ile tek bir projeyi getirir.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet

Yanıt Örneği

JSON
{
  "data": {
    "createdAt": "2026-03-06T11:14:02.304042",
    "description": "SEO ve crawl yönetim platformu",
    "id": 4,
    "name": "E-Sentinel",
    "slug": "esentinel",
    "status": "DRAFT",
    "updatedAt": "2026-03-06T11:14:02.304042",
    "uuid": "3b148de8-a940-4895-83a5-de8e022280f1"
  },
  "message": "Proje detayı getirildi.",
  "success": true,
  "timestamp": "2026-03-06T11:14:16.4475673"
}
GET/api/platform/projects/by-slug/{slug}

Slug ile proje detayını getirir.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet

Yanıt Örneği

JSON
{
  "data": {
    "createdAt": "2026-03-06T11:14:02.304042",
    "description": "SEO ve crawl yönetim platformu",
    "id": 4,
    "name": "E-Sentinel",
    "slug": "esentinel",
    "status": "DRAFT",
    "updatedAt": "2026-03-06T11:14:02.304042",
    "uuid": "3b148de8-a940-4895-83a5-de8e022280f1"
  },
  "message": "Slug ile proje bulundu.",
  "success": true,
  "timestamp": "2026-03-06T11:14:23.4142394"
}
PUT/api/platform/projects/{id}

Mevcut proje bilgilerini günceller.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet
Content-Typeapplication/jsonEvet

İstek Örneği

Terminal
{
  "name": "E-Sentinel Updated",
  "slug": "esentinel",
  "description": "Güncellenmiş açıklama"
}

Yanıt Örneği

JSON
{
  "data": {
    "createdAt": "2026-03-06T11:14:02.304042",
    "description": "Güncellenmiş açıklama",
    "id": 4,
    "name": "E-Sentinel Updated",
    "slug": "esentinel",
    "status": "DRAFT",
    "updatedAt": "2026-03-06T11:14:02.304042",
    "uuid": "3b148de8-a940-4895-83a5-de8e022280f1"
  },
  "message": "Proje güncellendi.",
  "success": true,
  "timestamp": "2026-03-06T11:14:30.019656"
}
DELETE/api/platform/projects/{id}

Projeyi siler.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet

Yanıt Örneği

JSON
{
  "data": null,
  "message": "Proje silindi.",
  "success": true,
  "timestamp": "2026-03-06T11:13:52.0038695"
}

Domain Yönetimi

POST/api/platform/projects/{id}/domains

Projeye yeni domain ekler.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet
Content-Typeapplication/jsonEvet

İstek Örneği

Terminal
{
  "domain": "platform.evdsoft.com",
  "primary": false,
  "active": true
}

Yanıt Örneği

JSON
{
  "data": {
    "active": true,
    "createdAt": "2026-03-06T11:14:50.2285811",
    "domain": "platform.evdsoft.com",
    "id": 4,
    "primary": false,
    "projectId": 4,
    "updatedAt": "2026-03-06T11:14:50.2285811"
  },
  "message": "Proje domaini eklendi.",
  "success": true,
  "timestamp": "2026-03-06T11:14:50.2326642"
}
GET/api/platform/projects/{id}/domains

Projeye ait domain listesini döner.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet

Yanıt Örneği

JSON
{
  "data": [
    {
      "active": true,
      "createdAt": "2026-03-06T11:14:50.228581",
      "domain": "platform-dev.evdsoft.com",
      "id": 4,
      "primary": true,
      "projectId": 4,
      "updatedAt": "2026-03-06T11:14:56.78918"
    }
  ],
  "message": "Proje domainleri getirildi.",
  "success": true,
  "timestamp": "2026-03-06T11:15:05.6122006"
}
PUT/api/platform/projects/{projectId}/domains/{domainId}

Bir proje domain kaydını günceller.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet
Content-Typeapplication/jsonEvet

İstek Örneği

Terminal
{
  "domain": "platform-dev.evdsoft.com",
  "primary": true,
  "active": true
}

Yanıt Örneği

JSON
{
  "data": {
    "active": true,
    "createdAt": "2026-03-06T11:14:50.228581",
    "domain": "platform-dev.evdsoft.com",
    "id": 4,
    "primary": true,
    "projectId": 4,
    "updatedAt": "2026-03-06T11:14:50.228581"
  },
  "message": "Proje domaini güncellendi.",
  "success": true,
  "timestamp": "2026-03-06T11:14:56.7916878"
}

Domain Resolve

GET/api/platform/projects/resolve

Domain değerine göre proje, eşleşen domain, auth ayarları ve servis ayarlarını çözer.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet

Query Parametreleri

ParametreTipAçıklamaZorunlu
domainstringÇözümlenecek domain adresiEvet

Yanıt Örneği

JSON
{
  "data": {
    "authSettings": {
      "approvalRequired": false,
      "emailVerificationRequired": false,
      "id": 4,
      "inviteOnly": false,
      "phoneVerificationRequired": false,
      "projectId": 4,
      "registrationMode": "OPEN",
      "twoFactorRequired": false
    },
    "matchedDomain": {
      "active": true,
      "createdAt": "2026-03-06T11:14:50.228581",
      "domain": "platform-dev.evdsoft.com",
      "id": 4,
      "primary": true,
      "projectId": 4,
      "updatedAt": "2026-03-06T11:14:56.78918"
    },
    "project": {
      "createdAt": "2026-03-06T11:14:02.304042",
      "description": "Güncellenmiş açıklama",
      "id": 4,
      "name": "E-Sentinel Updated",
      "slug": "esentinel",
      "status": "DRAFT",
      "updatedAt": "2026-03-06T11:14:30.017612",
      "uuid": "3b148de8-a940-4895-83a5-de8e022280f1"
    },
    "serviceSettings": {
      "auditEnabled": true,
      "authEnabled": true,
      "id": 2,
      "mailEnabled": false,
      "projectId": 4,
      "smsEnabled": false
    }
  },
  "message": "Domain çözümleme başarılı.",
  "success": true,
  "timestamp": "2026-03-06T11:15:01.7934204"
}

Servis Ayarları

GET/api/platform/projects/{id}/service-settings

Projeye ait servis ayarlarını getirir.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet

Yanıt Örneği

JSON
{
  "data": {
    "auditEnabled": true,
    "authEnabled": true,
    "id": 2,
    "mailEnabled": false,
    "projectId": 4,
    "smsEnabled": false
  },
  "message": "Proje servis ayarları getirildi.",
  "success": true,
  "timestamp": "2026-03-06T11:15:12.9058885"
}
PUT/api/platform/projects/{id}/service-settings

Projeye ait servis aktivasyon ayarlarını günceller.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet
Content-Typeapplication/jsonEvet

İstek Örneği

Terminal
{
  "authEnabled": true,
  "mailEnabled": true,
  "smsEnabled": true,
  "auditEnabled": true
}

Yanıt Örneği

JSON
{
  "data": {
    "auditEnabled": true,
    "authEnabled": true,
    "id": 2,
    "mailEnabled": true,
    "projectId": 4,
    "smsEnabled": true
  },
  "message": "Proje servis ayarları güncellendi.",
  "success": true,
  "timestamp": "2026-03-06T11:16:08.1628662"
}

Auth Ayarları

GET/api/platform/projects/{id}/auth-settings

Projeye ait auth ayarlarını getirir.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet

Yanıt Örneği

JSON
{
  "data": {
    "approvalRequired": false,
    "emailVerificationRequired": false,
    "id": 4,
    "inviteOnly": false,
    "phoneVerificationRequired": false,
    "projectId": 4,
    "registrationMode": "OPEN",
    "twoFactorRequired": false
  },
  "message": "Proje auth ayarları getirildi.",
  "success": true,
  "timestamp": "2026-03-06T11:15:19.8986982"
}
PUT/api/platform/projects/{id}/auth-settings

Projeye ait auth davranışlarını günceller.

Headers

İsimDeğerZorunlu
X-PLATFORM-KEY{{platformKey}}Evet
Content-Typeapplication/jsonEvet

İstek Örneği

Terminal
{
  "registrationMode": "APPROVAL_REQUIRED",
  "emailVerificationRequired": true,
  "phoneVerificationRequired": false,
  "approvalRequired": true,
  "inviteOnly": false,
  "twoFactorRequired": true
}

Yanıt Örneği

JSON
{
  "data": {
    "approvalRequired": true,
    "emailVerificationRequired": true,
    "id": 4,
    "inviteOnly": false,
    "phoneVerificationRequired": false,
    "projectId": 4,
    "registrationMode": "APPROVAL_REQUIRED",
    "twoFactorRequired": true
  },
  "message": "Proje auth ayarları güncellendi.",
  "success": true,
  "timestamp": "2026-03-06T11:16:26.6248607"
}

Registration Mode Değerleri

  • OPEN - Herkes kayıt olabilir
  • APPROVAL_REQUIRED - Kayıt sonrası manuel onay gerekir
  • INVITE_ONLY - Sadece davetli kullanıcılar kayıt olabilir

Veri Modelleri

Aşağıdaki tablolar, mevcut koleksiyondaki gerçek response örneklerine göre hazırlanmıştır.

Project Şeması

AlanTipAçıklama
idnumberBenzersiz proje ID değeri
uuidstringProjenin global benzersiz UUID değeri
namestringProje adı
slugstringURL dostu proje kısa adı
descriptionstring | nullProje açıklaması
statusenumMevcut örneklerde DRAFT değeri dönüyor
createdAtdatetimeOluşturulma tarihi
updatedAtdatetimeSon güncellenme tarihi

Domain Şeması

AlanTipAçıklama
idnumberBenzersiz domain ID değeri
projectIdnumberİlgili projenin ID değeri
domainstringDomain adresi
primarybooleanBirincil domain olup olmadığı
activebooleanDomain aktif mi?
createdAtdatetimeOluşturulma tarihi
updatedAtdatetimeSon güncellenme tarihi

Service Settings Şeması

AlanTipAçıklama
idnumberServis ayarı kayıt ID değeri
projectIdnumberİlgili proje ID değeri
authEnabledbooleanAuth servisi aktif mi?
mailEnabledbooleanMail servisi aktif mi?
smsEnabledbooleanSMS servisi aktif mi?
auditEnabledbooleanAudit servisi aktif mi?

Auth Settings Şeması

AlanTipAçıklama
idnumberAuth ayar kayıt ID değeri
projectIdnumberİlgili proje ID değeri
registrationModeenumKayıt modu
emailVerificationRequiredbooleanE-posta doğrulama zorunlu mu?
phoneVerificationRequiredbooleanTelefon doğrulama zorunlu mu?
approvalRequiredbooleanKayıt sonrası onay gerekiyor mu?
inviteOnlybooleanSadece davetli kullanıcılar mı kayıt olabilir?
twoFactorRequiredboolean2FA zorunlu mu?

Yanıt Standardı

Koleksiyondaki tüm örneklerde response gövdesi tutarlı biçimde aşağıdaki alanları kullanıyor:

AlanTipAçıklama
successbooleanİşlemin başarılı olup olmadığını belirtir
messagestringİşleme ait kullanıcı dostu açıklama mesajı
dataobject | array | nullAsıl yanıt yükü
timestampdatetimeYanıtın üretildiği zaman damgası