Save/Unsave Domain

View as Markdown

Provides endpoints to save, unsave, and list saved domains for the authenticated user. GET: List all saved domains. POST: Save a domain to user’s collection. DELETE: Remove a domain from user’s saved collection.

Request

This endpoint expects an object.
idstringRequiredformat: "uuid"
created_byobjectRequired
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
co_creatorslist of objectsRequired
namestringOptional<=255 characters
themestringOptional<=64 characters
summarystring or nullOptional<=1024 characters
descriptionstring or nullOptional
coverstring or nullOptionalformat: "uri"

Cover image for the domain (copied from experience)

focus_areastring or nullOptional<=256 characters
visibilityenumOptional
* `public` - Public * `private` - Private * `team` - Team * `org` - Organization
Allowed values:
is_draftbooleanOptional
creation_statusenumOptional
* `not_started` - Not Started * `in_progress` - In Progress * `completed` - Completed * `failed` - Failed
Allowed values:

Response

List of saved domains
idstringformat: "uuid"
domain_idintegerRead-only
tagslist of stringsRead-only
created_byobject
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
categorystring or nullRead-only
subcategorystring or nullRead-only
co_creatorslist of objects
savedbooleanRead-only
metricsstringRead-only
workspace_idintegerRead-only
publicationmap from strings to any or nullRead-only
namestring<=255 characters
themestring<=64 characters
summarystring or null<=1024 characters
descriptionstring or null
coverstring or nullformat: "uri"

Cover image for the domain (copied from experience)

focus_areastring or null<=256 characters
visibilityenum
* `public` - Public * `private` - Private * `team` - Team * `org` - Organization
Allowed values:
is_draftboolean
creation_statusenum
* `not_started` - Not Started * `in_progress` - In Progress * `completed` - Completed * `failed` - Failed
Allowed values:

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error