List Logs (v1)
Get system audit logs with filtering.
Method & Path
GET /v1/admin/logs
Description
Retrieves a paginated list of system audit logs with optional filtering by actor, target, and action.
Authentication
Required: Admin authentication with audit.logs.view permission.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | No | Page number |
limit | number | No | Items per page (max: 100) |
actorId | string | No | Filter by actor admin ID |
actorEmail | string | No | Filter by actor email |
targetType | enum | No | Filter by target resource type |
targetId | string | No | Filter by target resource ID |
action | enum | No | Filter by action type |
Response 200 OK
{
"logs": [
{
"id": "507f1f77bcf86cd799439011",
"actorId": "507f1f77bcf86cd799439012",
"actorEmail": "admin@example.com",
"action": "create",
"targetType": "workspace",
"targetId": "507f1f77bcf86cd799439013",
"createdAt": "2024-01-15T10:00:00Z"
}
],
"meta": {
"pagination": {
"page": 1,
"limit": 20,
"total": 100
},
"resourceTypes": ["workspace", "admin", "plan"],
"actions": ["create", "update", "delete"]
}
}
Common Errors
- 401 Unauthorized: Missing or invalid admin authentication token
- 403 Forbidden: Insufficient permissions
- 400 Bad Request: Invalid query parameters
- 500 Internal Server Error: Server error