API Key İptal Et
API anahtarını iptal eder (soft delete).
Endpoint
POST /api/v1/api-keys/\{uuid\}/revoke
Authentication
Bu endpoint authentication gerektirir.
Header: Authorization: Bearer \{token\}
Permission
api.keys.revoke- Tüm API anahtarlarını iptal etmeapi.keys.revoke.own- Sadece kendi API anahtarlarını iptal etme
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)
{
"message": "API key revoked"
}
Error Responses
404 Not Found
{
"message": "Not Found"
}
403 Forbidden
{
"message": "Forbidden"
}
Code Examples
cURL
curl -X POST https://api.example.com/api/v1/api-keys/550e8400-e29b-41d4-a716-446655440000/revoke \
-H "Authorization: Bearer \{token\}"
Notes
- Soft delete kullanılır, kayıt veritabanından silinmez
- İptal edilen anahtarlar
with_trashed=trueparametresi ile görüntülenebilir - İptal edilen anahtar geri yüklenebilir
- İptal edilen anahtarlar API isteklerinde kullanılamaz
.ownpermission'ı olan kullanıcılar sadece kendi anahtarlarını iptal edebilir
Related Endpoints
- API Key Geri Yükle - API key geri yükle
- API Key Detayı - API key detayını getir