Ana içeriğe geç

Rapor Detayı

UUID ile rapor detayını getirir.

Endpoint

GET /api/v1/reports/\{uuid\}

Authentication

Bu endpoint authentication gerektirir.

Header: Authorization: Bearer \{token\}

Permission

  • reports.view - Tüm raporları görüntüleme
  • reports.view.own - Sadece kendi raporlarını görüntüleme

Request

Headers

HeaderDeğerZorunlu
AuthorizationBearer \{token\}Evet

Path Parameters

ParametreTipZorunluAçıklama
uuidstringEvetRapor UUID'si

Response

Success Response (200 OK)

{
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "Kullanıcı Raporu",
"report_type": "users",
"parameters": {
"date_from": "2025-01-01",
"date_to": "2025-12-31",
"status": "active"
},
"format": "pdf",
"status": "completed",
"file_path": "/storage/reports/550e8400-e29b-41d4-a716-446655440000.pdf",
"is_active": true,
"user_id": 1,
"user": {
"id": 1,
"email": "user@example.com"
},
"created_at": "2025-11-20T12:00:00.000000Z",
"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 GET https://api.example.com/api/v1/reports/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer \{token\}"

Notes

  • Sadece aktif raporlar görüntülenebilir
  • Silinmiş veya pasif raporlar için 404 döner
  • Rapor kullanıcı bilgileri ile birlikte döner
  • Tamamlanmış raporlarda file_path alanı bulunur