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
| Durum | HTTP | error.code |
|---|---|---|
| Yetkisiz erişim | 401 | UNAUTHORIZED |
| Yetki yok | 403 | FORBIDDEN |
| Kayıt yok | 404 | NOT_FOUND |
| Geçersiz id | 400 | VALIDATION_ERROR |
| İç hata | 500 | INTERNAL_ERROR |