Audit Logs
Track all actions and changes in your system.
What are Audit Logs?
Audit logs provide a complete history of all actions performed in your tenant. Every important action is automatically logged.
Logged Actions:
- License validations
- License assignments
- License status changes
- User creation
- Product and plan creation
- API key creation and revocation
Retrieving Audit Logs
Get Audit Logs
GET /api/v1/admin/audit-logs?entityType=license&entityId=...
Query Parameters:
- entityType (optional) - Filter by entity type
- entityId (optional) - Filter by entity ID
Response:
{
"success": true,
"data": [
{
"id": "...",
"action": "license.validated",
"entityType": "license",
"entityId": "license_123",
"timestamp": "2024-01-01T00:00:00Z",
"metadata": {
"result": "valid",
"userId": "user_123"
}
}
]
}Audit Log Actions
License actions: license.created, license.assigned, license.validated, license.suspended, license.revoked
User actions: user.created, user.updated
Product/Plan actions: product.created, plan.created
API key actions: api_key.created, api_key.revoked