Ana içeriğe geç

Permissions Detail Endpoint

Bu sayfa, permissions tekil kayıt detayını okumak için düşünülen endpoint sözleşmesini tanımlar.

Önerilen Route

GET /v1/admin/permissions/{id}

Auth Gereksinimi

  • admin auth zorunlu
  • JWT + session + auth context doğrulama zorunlu
  • detaylı rol/yetki seviyesi daha sonra netleştirilecektir

Read Kuralı

  • önce ilgili Redis cache/projection kontrol edilir
  • cache yoksa veya stale ise DB fallback yapılır
  • DB sonucu ile Redis cache yeniden oluşturulur veya güncellenir
  • authoritative source DB'dir

Örnek Response

{
"ok": true,
"data": {
"id": 11,
"code": "reports.view",
"name": "Reports View",
"is_active": true,
"created_at": "2026-04-20T06:00:00Z",
"updated_at": "2026-04-20T06:00:00Z"
},
"error": null,
"meta": {
"request_id": "req_123",
"timestamp": "2026-04-20T06:00:00Z"
}
}

Hata Modeli

DurumHTTPerror.code
Yetkisiz erişim401UNAUTHORIZED
Yetki yok403FORBIDDEN
Kayıt yok404NOT_FOUND
Geçersiz id400VALIDATION_ERROR
İç hata500INTERNAL_ERROR