Retrieve and Update User Activity
Retrieves or updates a specific user activity.
Path parameters
id
Response
User activity details
id
user
Mixin to handle profile_picture serialization for WebSocket compatibility.
This mixin adds a SerializerMethodField for profile_picture that converts
ImageFieldFile objects to URL strings, making them JSON serializable for
WebSocket consumers.
The mixin intelligently handles profile pictures from IAMUserDetail by:
1. Accessing the related `details` queryset on the IAMUser model
2. Extracting the ImageFieldFile from the first detail record
3. Converting it to a URL string for JSON serialization
Usage:
```python
class MyUserSerializer(ProfilePictureMixin, serializers.ModelSerializer):
class Meta:
model = User
fields = ['id', 'username', 'profile_picture', ...]
```
Note:
- This mixin expects the model to have a `details` related manager
- The related detail should have a `profile_picture` ImageField
- Returns None if no profile picture is found or an error occurs
workspace_group_id
uid
created_at
updated_at
text
activity_type
* `100` - User Login
* `101` - User Logout
* `200` - Game Created
* `201` - Game Joined
* `202` - Game Left
* `203` - Game Started
* `204` - Game Completed
* `205` - Game Won
* `250` - Daily Streak
* `300` - Elo Gained
* `301` - Elo Lost
* `400` - XP Gained
* `500` - Resource Viewed
* `501` - Resource Liked
* `502` - Resource Unliked
* `503` - Resource Shared
* `504` - Resource Bookmarked
* `505` - Resource Unbookmarked
* `506` - Resource Commented
* `507` - Resource Created
* `508` - Resource Updated
* `509` - Resource Deleted
* `600` - Quest Created
* `601` - Quest Viewed
* `602` - Quest Updated
* `603` - Quest Deleted
* `604` - Quest Played
* `605` - Quest Completed
* `606` - Quest Leaderboard Viewed
* `700` - Publication Created
* `701` - Publication Viewed
* `702` - Publication Updated
* `703` - Publication Deleted
* `750` - Blog Created
* `751` - Blog Viewed
* `752` - Blog Read
* `753` - Blog Updated
* `754` - Blog Deleted
* `755` - Blog Bookmarked
* `756` - Blog Unbookmarked
* `757` - Blog Previewed
* `800` - Experience Created
* `801` - Experience Viewed
* `802` - Experience Updated
* `803` - Experience Deleted
* `804` - Experience Published
* `805` - Experience Autofilled
* `806` - Experience Bulk Deleted
* `900` - AI Domain Created
* `901` - AI Domain Viewed
* `902` - AI Domain Updated
* `903` - AI Domain Deleted
* `904` - AI Domain Saved
* `905` - AI Question Generated
* `906` - AI Answer Generated
* `907` - AI Explanation Generated
* `908` - AI Checker Generated
* `909` - AI Options Generated
* `910` - AI Chat Started
* `911` - AI Chat Message Sent
* `912` - AI Domain Knowledge Rebuilt
* `913` - AI Knowledge Searched
* `1000` - Podcast Created
* `1001` - Podcast Viewed
* `1002` - Podcast Listened
* `1003` - Podcast Updated
* `1004` - Podcast Deleted
* `1050` - Video Created
* `1051` - Video Viewed
* `1052` - Video Updated
* `1053` - Video Deleted
* `1054` - Video Published
* `1055` - Video Regenerated
* `1100` - Content Document Created
* `1101` - Content Document Viewed
* `1102` - Content Document Updated
* `1103` - Content Document Deleted
* `1104` - Content Document Reprocessed
* `1400` - Collection Created
* `1401` - Collection Viewed
* `1402` - Collection Updated
* `1403` - Collection Deleted
* `1404` - Collection Experience Added
* `1405` - Collection Experience Removed
* `1406` - Collection Experience Reordered
* `1200` - Profile Updated
* `1201` - Profile Picture Updated
* `1202` - Profile Viewed
* `1300` - User Followed
* `1301` - User Unfollowed
* `1302` - User Profile Visited
deleted_at
is_active
created_by
updated_by
deleted_by
resource
workspace_group
Workspace group this activity belongs to (derived from user personal workspace or resource context)
Errors
401
Unauthorized Error
404
Not Found Error

