@hailer/mcp 0.0.6 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/ada.md +127 -0
- package/.claude/agents/agent-builder.md +151 -0
- package/.claude/agents/alejandro.md +66 -0
- package/.claude/agents/bjorn.md +305 -0
- package/.claude/agents/dmitri.md +61 -0
- package/.claude/agents/giuseppe.md +66 -0
- package/.claude/agents/gunther.md +355 -0
- package/.claude/agents/helga.md +68 -0
- package/.claude/agents/ingrid.md +108 -0
- package/.claude/agents/kenji.md +58 -0
- package/.claude/agents/svetlana.md +394 -0
- package/.claude/agents/viktor.md +63 -0
- package/.claude/agents/yevgeni.md +60 -0
- package/.claude/hooks/agent-failure-detector.cjs +286 -0
- package/.claude/hooks/app-edit-guard.cjs +462 -0
- package/.claude/hooks/interactive-mode.cjs +59 -0
- package/.claude/hooks/mcp-server-guard.cjs +92 -0
- package/.claude/hooks/post-scaffold-hook.cjs +31 -0
- package/.claude/hooks/sdk-delete-guard.cjs +2 -0
- package/.claude/hooks/src-edit-guard.cjs +208 -0
- package/.claude/settings.json +47 -2
- package/.claude/skills/insight-join-patterns/SKILL.md +209 -0
- package/.env.example +13 -1
- package/CLAUDE.md +135 -0
- package/dist/app.js +4 -3
- package/dist/cli.js +0 -0
- package/dist/client/adaptive-documentation-bot.d.ts +0 -2
- package/dist/client/adaptive-documentation-bot.js +5 -16
- package/dist/client/message-processor.js +5 -0
- package/dist/client/providers/anthropic-provider.js +21 -7
- package/dist/mcp/UserContextCache.d.ts +14 -0
- package/dist/mcp/UserContextCache.js +49 -24
- package/dist/mcp/auth.d.ts +7 -0
- package/dist/mcp/auth.js +13 -5
- package/dist/mcp/hailer-clients.d.ts +5 -2
- package/dist/mcp/signal-handler.d.ts +28 -2
- package/dist/mcp/signal-handler.js +4 -2
- package/dist/mcp/tool-registry.d.ts +55 -2
- package/dist/mcp/tool-registry.js +197 -2
- package/dist/mcp/tools/app-core.d.ts +15 -0
- package/dist/mcp/tools/app-core.js +609 -0
- package/dist/mcp/tools/app-marketplace.d.ts +21 -0
- package/dist/mcp/tools/app-marketplace.js +1284 -0
- package/dist/mcp/tools/app-member.d.ts +11 -0
- package/dist/mcp/tools/app-member.js +258 -0
- package/dist/mcp/tools/app-scaffold.d.ts +11 -0
- package/dist/mcp/tools/app-scaffold.js +743 -0
- package/dist/mcp/tools/app.d.ts +13 -22
- package/dist/mcp/tools/app.js +17 -2466
- package/dist/mcp/tools/file.js +6 -6
- package/dist/mcp/tools/insight.d.ts +1 -0
- package/dist/mcp/tools/insight.js +203 -64
- package/dist/mcp/tools/user.js +3 -9
- package/dist/mcp/tools/workflow.js +49 -38
- package/dist/mcp/utils/hailer-api-client.js +4 -13
- package/dist/mcp/utils/tool-helpers.d.ts +102 -0
- package/dist/mcp/utils/tool-helpers.js +179 -0
- package/dist/mcp/utils/types.d.ts +6 -0
- package/dist/mcp/workspace-cache.d.ts +5 -5
- package/dist/mcp/workspace-cache.js +4 -3
- package/package.json +1 -1
- package/.claude/hooks/PreToolUse.sh +0 -52
- package/.claude/hooks/prompt-skill-loader.cjs +0 -553
- package/.claude/hooks/skill-loader.cjs +0 -142
- package/.claude/settings.local.json +0 -49
- package/.claude/skills/MCP-add-app-member-skill/SKILL.md +0 -977
- package/.claude/skills/MCP-build-data-app-skill/SKILL.md +0 -372
- package/.claude/skills/MCP-create-app-skill/SKILL.md +0 -1101
- package/.claude/skills/MCP-create-insight-skill/SKILL.md +0 -1317
- package/.claude/skills/MCP-get-insight-data-skill/SKILL.md +0 -1053
- package/.claude/skills/MCP-insight-api/SKILL.md +0 -185
- package/.claude/skills/MCP-insight-api/references/insight-endpoints.md +0 -514
- package/.claude/skills/MCP-install-workflow-skill/SKILL.md +0 -1056
- package/.claude/skills/MCP-list-apps-skill/SKILL.md +0 -1010
- package/.claude/skills/MCP-list-workflows-minimal-skill/SKILL.md +0 -992
- package/.claude/skills/MCP-local-first-skill/SKILL.md +0 -570
- package/.claude/skills/MCP-populate-workflow-data-skill/SKILL.md +0 -395
- package/.claude/skills/MCP-preview-insight-skill/SKILL.md +0 -1290
- package/.claude/skills/MCP-publish-hailer-app-skill/SKILL.md +0 -453
- package/.claude/skills/MCP-publish-template-skill/SKILL.md +0 -278
- package/.claude/skills/MCP-remove-app-member-skill/SKILL.md +0 -671
- package/.claude/skills/MCP-remove-app-skill/SKILL.md +0 -985
- package/.claude/skills/MCP-remove-insight-skill/SKILL.md +0 -1011
- package/.claude/skills/MCP-remove-workflow-skill/SKILL.md +0 -920
- package/.claude/skills/MCP-scaffold-hailer-app-skill/SKILL.md +0 -1314
- package/.claude/skills/MCP-update-app-skill/SKILL.md +0 -970
- package/.claude/skills/MCP-update-workflow-field-skill/SKILL.md +0 -1098
- package/.claude/skills/SDK-create-function-field-skill/SKILL.md +0 -313
- package/.claude/skills/SDK-generate-skill/SKILL.md +0 -223
- package/.claude/skills/SDK-init-skill/SKILL.md +0 -177
- package/.claude/skills/SDK-workspace-setup-skill/SKILL.md +0 -605
- package/.claude/skills/SDK-ws-config-skill/SKILL.md +0 -435
- package/.claude/skills/activity-api/SKILL.md +0 -96
- package/.claude/skills/activity-api/references/activity-endpoints.md +0 -845
- package/.claude/skills/agent-building/SKILL.md +0 -243
- package/.claude/skills/agent-building/references/architecture-patterns.md +0 -446
- package/.claude/skills/agent-building/references/code-examples.md +0 -587
- package/.claude/skills/agent-building/references/implementation-guide.md +0 -619
- package/.claude/skills/app-api/SKILL.md +0 -219
- package/.claude/skills/app-api/references/app-endpoints.md +0 -759
- package/.claude/skills/building-hailer-apps-skill/SKILL.md +0 -813
- package/.claude/skills/hailer-api/SKILL.md +0 -283
- package/.claude/skills/hailer-api/references/activities.md +0 -620
- package/.claude/skills/hailer-api/references/authentication.md +0 -216
- package/.claude/skills/hailer-api/references/datasets.md +0 -437
- package/.claude/skills/hailer-api/references/files.md +0 -301
- package/.claude/skills/hailer-api/references/insights.md +0 -469
- package/.claude/skills/hailer-api/references/workflows.md +0 -720
- package/.claude/skills/hailer-api/references/workspaces-users.md +0 -445
- package/.claude/skills/hailer-app-builder/SKILL.md +0 -340
- package/.claude/skills/mcp-tools/SKILL.md +0 -419
- package/.claude/skills/mcp-tools/references/api-endpoints.md +0 -499
- package/.claude/skills/mcp-tools/references/data-structures.md +0 -554
- package/.claude/skills/mcp-tools/references/implementation-patterns.md +0 -717
- package/.claude/skills/skill-testing/README.md +0 -137
- package/.claude/skills/skill-testing/SKILL.md +0 -348
- package/.claude/skills/skill-testing/references/test-patterns.md +0 -705
- package/.claude/skills/skill-testing/references/testing-guide.md +0 -603
- package/.claude/skills/skill-testing/references/validation-checklist.md +0 -537
- package/.claude/skills/spawn-app-builder/SKILL.md +0 -366
- package/.claude/skills/tool-builder/SKILL.md +0 -328
- package/tsconfig.json +0 -23
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
# Hailer Workspaces & Users API
|
|
2
|
-
|
|
3
|
-
## Workspaces
|
|
4
|
-
|
|
5
|
-
Workspaces are top-level organizational units containing activities, datasets, files, and users.
|
|
6
|
-
|
|
7
|
-
### Get Workspace
|
|
8
|
-
|
|
9
|
-
```http
|
|
10
|
-
GET /v3/workspaces/{workspace_id}
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Response:**
|
|
14
|
-
```json
|
|
15
|
-
{
|
|
16
|
-
"id": "ws_123",
|
|
17
|
-
"name": "Rekna Production",
|
|
18
|
-
"description": "Main workspace for Rekna operations",
|
|
19
|
-
"created_at": "2024-01-01T00:00:00Z",
|
|
20
|
-
"settings": {
|
|
21
|
-
"timezone": "Europe/Helsinki",
|
|
22
|
-
"language": "fi",
|
|
23
|
-
"date_format": "DD.MM.YYYY"
|
|
24
|
-
},
|
|
25
|
-
"member_count": 25,
|
|
26
|
-
"activity_count": 1523
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### List Workspaces
|
|
31
|
-
|
|
32
|
-
```http
|
|
33
|
-
GET /v3/workspaces
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Returns all workspaces the authenticated user has access to.
|
|
37
|
-
|
|
38
|
-
### Create Workspace
|
|
39
|
-
|
|
40
|
-
```http
|
|
41
|
-
POST /v3/workspaces
|
|
42
|
-
Content-Type: application/json
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
"name": "New Project Workspace",
|
|
46
|
-
"description": "Workspace for new project",
|
|
47
|
-
"settings": {
|
|
48
|
-
"timezone": "Europe/Helsinki",
|
|
49
|
-
"language": "fi"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Update Workspace
|
|
55
|
-
|
|
56
|
-
```http
|
|
57
|
-
PATCH /v3/workspaces/{workspace_id}
|
|
58
|
-
Content-Type: application/json
|
|
59
|
-
|
|
60
|
-
{
|
|
61
|
-
"name": "Updated Workspace Name",
|
|
62
|
-
"description": "New description"
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Delete Workspace
|
|
67
|
-
|
|
68
|
-
```http
|
|
69
|
-
DELETE /v3/workspaces/{workspace_id}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
⚠️ **Warning:** Deletes all activities, datasets, files, and content within the workspace.
|
|
73
|
-
|
|
74
|
-
## Workspace Settings
|
|
75
|
-
|
|
76
|
-
### Update Settings
|
|
77
|
-
|
|
78
|
-
```http
|
|
79
|
-
PATCH /v3/workspaces/{workspace_id}/settings
|
|
80
|
-
Content-Type: application/json
|
|
81
|
-
|
|
82
|
-
{
|
|
83
|
-
"timezone": "Europe/Helsinki",
|
|
84
|
-
"language": "fi",
|
|
85
|
-
"date_format": "DD.MM.YYYY",
|
|
86
|
-
"time_format": "24h",
|
|
87
|
-
"first_day_of_week": 1,
|
|
88
|
-
"working_hours": {
|
|
89
|
-
"start": "08:00",
|
|
90
|
-
"end": "17:00"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Users
|
|
96
|
-
|
|
97
|
-
### Get User Profile
|
|
98
|
-
|
|
99
|
-
```http
|
|
100
|
-
GET /v3/users/me
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
**Response:**
|
|
104
|
-
```json
|
|
105
|
-
{
|
|
106
|
-
"id": "user_123",
|
|
107
|
-
"name": "Johan Rekna",
|
|
108
|
-
"email": "johan@rekna.fi",
|
|
109
|
-
"avatar_url": "https://avatars.hailer.com/user_123",
|
|
110
|
-
"timezone": "Europe/Helsinki",
|
|
111
|
-
"language": "fi",
|
|
112
|
-
"created_at": "2023-01-01T00:00:00Z"
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### Update User Profile
|
|
117
|
-
|
|
118
|
-
```http
|
|
119
|
-
PATCH /v3/users/me
|
|
120
|
-
Content-Type: application/json
|
|
121
|
-
|
|
122
|
-
{
|
|
123
|
-
"name": "Johan Rekna",
|
|
124
|
-
"timezone": "Europe/Helsinki",
|
|
125
|
-
"language": "fi"
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### Get User by ID
|
|
130
|
-
|
|
131
|
-
```http
|
|
132
|
-
GET /v3/users/{user_id}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### List Users in Workspace
|
|
136
|
-
|
|
137
|
-
```http
|
|
138
|
-
GET /v3/workspaces/{workspace_id}/users
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
**Response:**
|
|
142
|
-
```json
|
|
143
|
-
{
|
|
144
|
-
"data": [
|
|
145
|
-
{
|
|
146
|
-
"id": "user_123",
|
|
147
|
-
"name": "Johan Rekna",
|
|
148
|
-
"email": "johan@rekna.fi",
|
|
149
|
-
"role": "admin",
|
|
150
|
-
"joined_at": "2023-01-01T00:00:00Z"
|
|
151
|
-
}
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
## Workspace Members
|
|
157
|
-
|
|
158
|
-
### Add Member to Workspace
|
|
159
|
-
|
|
160
|
-
```http
|
|
161
|
-
POST /v3/workspaces/{workspace_id}/members
|
|
162
|
-
Content-Type: application/json
|
|
163
|
-
|
|
164
|
-
{
|
|
165
|
-
"email": "newuser@company.com",
|
|
166
|
-
"role": "member",
|
|
167
|
-
"send_invitation": true
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
**Roles:**
|
|
172
|
-
- `admin` - Full workspace control
|
|
173
|
-
- `member` - Standard access
|
|
174
|
-
- `guest` - Limited access (read-only to assigned activities)
|
|
175
|
-
|
|
176
|
-
### Update Member Role
|
|
177
|
-
|
|
178
|
-
```http
|
|
179
|
-
PATCH /v3/workspaces/{workspace_id}/members/{user_id}
|
|
180
|
-
Content-Type: application/json
|
|
181
|
-
|
|
182
|
-
{
|
|
183
|
-
"role": "admin"
|
|
184
|
-
}
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
### Remove Member
|
|
188
|
-
|
|
189
|
-
```http
|
|
190
|
-
DELETE /v3/workspaces/{workspace_id}/members/{user_id}
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
## Permissions System
|
|
194
|
-
|
|
195
|
-
### Permission Levels
|
|
196
|
-
|
|
197
|
-
Hailer uses role-based and object-based permissions:
|
|
198
|
-
|
|
199
|
-
**Workspace Level:**
|
|
200
|
-
- `admin` - Full control
|
|
201
|
-
- `member` - Standard access
|
|
202
|
-
- `guest` - Limited access
|
|
203
|
-
|
|
204
|
-
**Activity Level:**
|
|
205
|
-
- `owner` - Created the activity
|
|
206
|
-
- `assigned` - Assigned to activity
|
|
207
|
-
- `follower` - Following activity
|
|
208
|
-
- `workspace_member` - Has workspace access
|
|
209
|
-
|
|
210
|
-
**Dataset Level:**
|
|
211
|
-
- `admin` - Full control
|
|
212
|
-
- `editor` - Can modify records
|
|
213
|
-
- `viewer` - Read-only
|
|
214
|
-
|
|
215
|
-
### Check Permissions
|
|
216
|
-
|
|
217
|
-
```http
|
|
218
|
-
GET /v3/activities/{activity_id}/permissions/me
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
**Response:**
|
|
222
|
-
```json
|
|
223
|
-
{
|
|
224
|
-
"can_read": true,
|
|
225
|
-
"can_update": true,
|
|
226
|
-
"can_delete": false,
|
|
227
|
-
"can_assign": true,
|
|
228
|
-
"can_comment": true
|
|
229
|
-
}
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
### List Activity Permissions
|
|
233
|
-
|
|
234
|
-
```http
|
|
235
|
-
GET /v3/activities/{activity_id}/permissions
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
**Response:**
|
|
239
|
-
```json
|
|
240
|
-
{
|
|
241
|
-
"data": [
|
|
242
|
-
{
|
|
243
|
-
"user_id": "user_123",
|
|
244
|
-
"name": "Johan Rekna",
|
|
245
|
-
"role": "owner",
|
|
246
|
-
"permissions": ["read", "update", "delete", "assign"]
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
"user_id": "user_456",
|
|
250
|
-
"name": "Team Member",
|
|
251
|
-
"role": "assigned",
|
|
252
|
-
"permissions": ["read", "update", "comment"]
|
|
253
|
-
}
|
|
254
|
-
]
|
|
255
|
-
}
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### Set Activity Permissions
|
|
259
|
-
|
|
260
|
-
```http
|
|
261
|
-
POST /v3/activities/{activity_id}/permissions
|
|
262
|
-
Content-Type: application/json
|
|
263
|
-
|
|
264
|
-
{
|
|
265
|
-
"user_id": "user_456",
|
|
266
|
-
"role": "assigned"
|
|
267
|
-
}
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
### Grant Workspace-Wide Permissions
|
|
271
|
-
|
|
272
|
-
```http
|
|
273
|
-
POST /v3/workspaces/{workspace_id}/permissions
|
|
274
|
-
Content-Type: application/json
|
|
275
|
-
|
|
276
|
-
{
|
|
277
|
-
"user_id": "user_456",
|
|
278
|
-
"permissions": {
|
|
279
|
-
"can_create_activities": true,
|
|
280
|
-
"can_create_datasets": false,
|
|
281
|
-
"can_manage_workflows": false
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
## Teams
|
|
287
|
-
|
|
288
|
-
Groups of users within a workspace.
|
|
289
|
-
|
|
290
|
-
### Create Team
|
|
291
|
-
|
|
292
|
-
```http
|
|
293
|
-
POST /v3/workspaces/{workspace_id}/teams
|
|
294
|
-
Content-Type: application/json
|
|
295
|
-
|
|
296
|
-
{
|
|
297
|
-
"name": "Development Team",
|
|
298
|
-
"description": "Software development team",
|
|
299
|
-
"member_ids": ["user_123", "user_456"]
|
|
300
|
-
}
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
### Add Users to Team
|
|
304
|
-
|
|
305
|
-
```http
|
|
306
|
-
POST /v3/teams/{team_id}/members
|
|
307
|
-
Content-Type: application/json
|
|
308
|
-
|
|
309
|
-
{
|
|
310
|
-
"user_ids": ["user_789"]
|
|
311
|
-
}
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
### Assign Team to Activity
|
|
315
|
-
|
|
316
|
-
```http
|
|
317
|
-
POST /v3/activities/{activity_id}/assignments
|
|
318
|
-
Content-Type: application/json
|
|
319
|
-
|
|
320
|
-
{
|
|
321
|
-
"team_id": "team_123"
|
|
322
|
-
}
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
## API Keys
|
|
326
|
-
|
|
327
|
-
Create API keys for programmatic access:
|
|
328
|
-
|
|
329
|
-
### Create API Key
|
|
330
|
-
|
|
331
|
-
```http
|
|
332
|
-
POST /v3/api-keys
|
|
333
|
-
Content-Type: application/json
|
|
334
|
-
|
|
335
|
-
{
|
|
336
|
-
"name": "Automation Script",
|
|
337
|
-
"workspace_id": "ws_123",
|
|
338
|
-
"scopes": ["activities:read", "activities:write", "datasets:read"],
|
|
339
|
-
"expires_at": "2026-12-31T23:59:59Z"
|
|
340
|
-
}
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
**Response:**
|
|
344
|
-
```json
|
|
345
|
-
{
|
|
346
|
-
"id": "key_789",
|
|
347
|
-
"name": "Automation Script",
|
|
348
|
-
"key": "hsk_abc123def456...",
|
|
349
|
-
"scopes": ["activities:read", "activities:write", "datasets:read"],
|
|
350
|
-
"created_at": "2025-01-15T10:30:00Z",
|
|
351
|
-
"expires_at": "2026-12-31T23:59:59Z"
|
|
352
|
-
}
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
⚠️ **Warning:** API key is only shown once. Store it securely.
|
|
356
|
-
|
|
357
|
-
### List API Keys
|
|
358
|
-
|
|
359
|
-
```http
|
|
360
|
-
GET /v3/api-keys
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
### Revoke API Key
|
|
364
|
-
|
|
365
|
-
```http
|
|
366
|
-
DELETE /v3/api-keys/{key_id}
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
## Available Scopes
|
|
370
|
-
|
|
371
|
-
### Activity Scopes
|
|
372
|
-
- `activities:read` - Read activities
|
|
373
|
-
- `activities:write` - Create/update activities
|
|
374
|
-
- `activities:delete` - Delete activities
|
|
375
|
-
|
|
376
|
-
### Dataset Scopes
|
|
377
|
-
- `datasets:read` - Read datasets and records
|
|
378
|
-
- `datasets:write` - Create/update datasets and records
|
|
379
|
-
- `datasets:delete` - Delete datasets and records
|
|
380
|
-
|
|
381
|
-
### File Scopes
|
|
382
|
-
- `files:read` - Read files
|
|
383
|
-
- `files:write` - Upload files
|
|
384
|
-
- `files:delete` - Delete files
|
|
385
|
-
|
|
386
|
-
### Workspace Scopes
|
|
387
|
-
- `workspaces:read` - Read workspace information
|
|
388
|
-
- `workspaces:write` - Update workspace settings
|
|
389
|
-
- `workspaces:admin` - Full workspace administration
|
|
390
|
-
|
|
391
|
-
### User Scopes
|
|
392
|
-
- `users:read` - Read user information
|
|
393
|
-
- `users:write` - Update user profiles
|
|
394
|
-
|
|
395
|
-
## Audit Logs
|
|
396
|
-
|
|
397
|
-
Track actions within workspace:
|
|
398
|
-
|
|
399
|
-
### List Audit Logs
|
|
400
|
-
|
|
401
|
-
```http
|
|
402
|
-
GET /v3/workspaces/{workspace_id}/audit-logs
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
**Query Parameters:**
|
|
406
|
-
- `user_id` - Filter by user
|
|
407
|
-
- `action` - Filter by action type
|
|
408
|
-
- `resource_type` - Filter by resource (activity, dataset, etc.)
|
|
409
|
-
- `start_date` - ISO 8601 timestamp
|
|
410
|
-
- `end_date` - ISO 8601 timestamp
|
|
411
|
-
|
|
412
|
-
**Response:**
|
|
413
|
-
```json
|
|
414
|
-
{
|
|
415
|
-
"data": [
|
|
416
|
-
{
|
|
417
|
-
"id": "log_123",
|
|
418
|
-
"action": "activity.created",
|
|
419
|
-
"user": {
|
|
420
|
-
"id": "user_123",
|
|
421
|
-
"name": "Johan Rekna"
|
|
422
|
-
},
|
|
423
|
-
"resource": {
|
|
424
|
-
"type": "activity",
|
|
425
|
-
"id": "act_456"
|
|
426
|
-
},
|
|
427
|
-
"timestamp": "2025-01-15T10:30:00Z",
|
|
428
|
-
"metadata": {
|
|
429
|
-
"ip_address": "192.168.1.1",
|
|
430
|
-
"user_agent": "Mozilla/5.0..."
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
]
|
|
434
|
-
}
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
## Best Practices
|
|
438
|
-
|
|
439
|
-
1. **Use teams for group permissions** - Easier than managing individual user permissions
|
|
440
|
-
2. **Create API keys with minimal scopes** - Principle of least privilege
|
|
441
|
-
3. **Rotate API keys regularly** - Set expiration dates
|
|
442
|
-
4. **Monitor audit logs** - Track suspicious activity
|
|
443
|
-
5. **Remove inactive members** - Clean up workspace regularly
|
|
444
|
-
6. **Use guest role for external collaborators** - Limit access appropriately
|
|
445
|
-
7. **Check permissions before operations** - Avoid unnecessary API calls
|