Rapor Güncelle
Rapor bilgilerini günceller.
Endpoint
PUT /api/v1/reports/\{uuid\}
PATCH /api/v1/reports/\{uuid\}
Authentication
Bu endpoint authentication gerektirir.
Header: Authorization: Bearer \{token\}
Permission
reports.generate- Tüm raporları güncellemereports.generate.own- Sadece kendi raporlarını güncelleme
Request
Headers
| Header | Değer | Zorunlu |
|---|---|---|
Authorization | Bearer \{token\} | Evet |
Content-Type | application/json | Evet |
Path Parameters
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
uuid | string | Evet | Rapor UUID'si |
Request Body
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
title | string | Hayır | Rapor başlığı |
report_type | string | Hayır | Rapor tipi |
parameters | object | Hayır | Rapor parametreleri (JSON) |
format | string | Hayır | Rapor formatı (pdf, excel, csv, json) |
status | string | Hayır | Rapor durumu (pending, processing, completed, failed) |
is_active | boolean | Hayır | Aktif durumu |
Example Request
{
"title": "Kullanıcı Raporu Updated",
"status": "processing",
"is_active": true
}
Response
Success Response (200 OK)
{
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "Kullanıcı Raporu Updated",
"report_type": "users",
"status": "processing",
"is_active": true,
"updated_at": "2025-11-20T12:00:00.000000Z"
}
Error Responses
404 Not Found
{
"message": "Not Found"
}
403 Forbidden
{
"message": "Forbidden"
}
Code Examples
cURL
curl -X PATCH https://api.example.com/api/v1/reports/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer \{token\}" \
-H "Content-Type: application/json" \
-d '{
"title": "Kullanıcı Raporu Updated",
"status": "processing"
}'
Notes
.ownpermission'ı olan kullanıcılar sadece kendi raporlarını güncelleyebilirPUTtüm alanları günceller,PATCHsadece gönderilen alanları günceller- Rapor durumu güncellenebilir (pending, processing, completed, failed)
Related Endpoints
- Rapor Detayı - Rapor detayını getir
- Rapor Sil - Rapor sil