API Key Detayı
UUID ile API anahtarı detayını getirir.
Endpoint
GET /api/v1/api-keys/\{uuid\}
Authentication
Bu endpoint authentication gerektirir.
Header: Authorization: Bearer \{token\}
Permission
api.keys.view- Tüm API anahtarlarını görüntülemeapi.keys.view.own- Sadece kendi API anahtarlarını görüntüleme
Request
Headers
| Header | Değer | Zorunlu |
|---|---|---|
Authorization | Bearer \{token\} | Evet |
Path Parameters
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
uuid | string | Evet | API key UUID'si |
Response
Success Response (200 OK)
{
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production API Key",
"key_prefix": "cc_live_",
"expires_at": "2026-12-31T23:59:59.000000Z",
"permissions": ["read", "write"],
"metadata": {
"environment": "production"
},
"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/api-keys/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer \{token\}"
Notes
- Sadece aktif anahtarlar görüntülenebilir
- Silinmiş veya pasif anahtarlar için 404 döner
- Anahtar kullanıcı bilgileri ile birlikte döner
- Tam key gösterilmez, sadece
key_prefixgösterilir
Related Endpoints
- API Key Listesi - Tüm API anahtarlarını listele
- API Key Güncelle - API key bilgilerini güncelle