Skip to main content

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.view or workspace.update

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier

Query Parameters

ParameterTypeRequiredDescription
pagenumberNoPage number (default: 1)
limitnumberNoItems per page (default: 20, max: 100)
actorTypestringNoFilter by actor type. Valid values: staff, workspace, system
targetTypestringNoFilter by target type. Valid values: session, client, staff, workspace, etc.
actionstringNoFilter 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