Get Activity Logs (v1)
Method + Path
GET /v1/workspace/:workspaceId/activity-logs
Actual backend path: /v1/workspace/:workspaceId/activity-logs
Description
Get workspace activity logs. Activity logs track all significant actions performed in the workspace.
Authentication
Required - JWT token in Authorization header
Required Permissions:
workspace.vieworworkspace.update
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token: Bearer <token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | No | Page number (default: 1) |
limit | number | No | Items per page (default: 20, max: 100) |
actorType | string | No | Filter by actor type. Valid values: staff, workspace, system |
targetType | string | No | Filter by target type. Valid values: session, client, staff, workspace, etc. |
action | string | No | Filter by action type |
Response (200)
{
"logs": [
{
"id": "507f1f77bcf86cd799439011",
"actorType": "staff",
"actorId": "507f1f77bcf86cd799439012",
"actorName": "John Doe",
"targetType": "session",
"targetId": "507f1f77bcf86cd799439013",
"action": "created",
"metadata": {},
"createdAt": "2024-01-15T10:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 100,
"totalPages": 5
}
}
Common Errors
- 401 Unauthorized: Missing or invalid authentication token
- 403 Forbidden: Insufficient permissions
- 404 Not Found: Workspace not found
- 500 Internal Server Error: Server error