Retrieve and Update User Activity

View as Markdown
Retrieves or updates a specific user activity.

Path parameters

idintegerRequired

Request

This endpoint expects an object.
userobjectRequired
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
textstringRequired<=1023 characters
activity_typeenumOptional
* `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_atdatetime or nullOptional
is_activebooleanOptional
created_bystring or nullOptional<=255 characters
updated_bystring or nullOptional<=255 characters
deleted_bystring or nullOptional<=255 characters
resourceany or nullOptional
workspace_groupinteger or nullOptional

Workspace group this activity belongs to (derived from user personal workspace or resource context)

Response

User activity details
idintegerRead-only
userobject
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_idintegerRead-only
uidstringRead-onlyformat: "uuid"
created_atdatetimeRead-only
updated_atdatetimeRead-only
textstring<=1023 characters
activity_typeenum
* `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_atdatetime or null
is_activeboolean
created_bystring or null<=255 characters
updated_bystring or null<=255 characters
deleted_bystring or null<=255 characters
resourceany or null
workspace_groupinteger or null

Workspace group this activity belongs to (derived from user personal workspace or resource context)

Errors

401
Unauthorized Error
404
Not Found Error