Permission Güncelle
Permission bilgilerini günceller.
Endpoint
PUT /api/v1/permissions/\{id\}
PATCH /api/v1/permissions/\{id\}
Authentication
Bu endpoint authentication gerektirir.
Header: Authorization: Bearer \{token\}
Permission
admin.manage- Admin yönetim işlemleripermissions.update- Permission güncelleme
Request
Headers
| Header | Değer | Zorunlu |
|---|---|---|
Authorization | Bearer \{token\} | Evet |
Content-Type | application/json | Evet |
Path Parameters
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
id | integer | Evet | Permission ID'si |
Request Body
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
name | string | Hayır | Permission adı (max: 191) |
slug | string | Hayır | Permission slug'ı (unique, max: 191) |
is_active | boolean | Hayır | Aktif durumu |
Example Request
{
"name": "İçerik Yönetimi Updated",
"is_active": false
}
Response
Success Response (200 OK)
{
"id": 10,
"name": "İçerik Yönetimi Updated",
"slug": "content.manage",
"is_active": false,
"created_at": "2025-11-20T12:00:00.000000Z",
"updated_at": "2025-11-20T12:00:00.000000Z"
}
Error Responses
403 Forbidden
{
"message": "İzin güncelleme yetkiniz yok"
}
Code Examples
cURL
curl -X PATCH https://api.example.com/api/v1/permissions/10 \
-H "Authorization: Bearer \{token\}" \
-H "Content-Type: application/json" \
-d '{
"name": "İçerik Yönetimi Updated",
"is_active": false
}'
Notes
PUTtüm alanları günceller,PATCHsadece gönderilen alanları günceller- Permission slug'ı benzersiz olmalıdır
Related Endpoints
- Permission Detayı - Permission detayını getir
- Permission Sil - Permission sil