Manage Domains

View as Markdown

Provides CRUD operations for domains. GET: Retrieve domains with optional filtering by ID, tag, recommendations, category, subcategory, saved status, search, and sorting options. POST: Create a new domain (requires admin/developer permissions). PATCH: Update an existing domain (requires domain access). DELETE: Remove a domain (requires domain access).

Query parameters

categorystringOptional
Filter domains by category name.
idstringOptionalformat: "uuid"
Filter by domain UID.
most_recentstringOptional

Sort domains by creation date (most recent first). Mutually exclusive with other sorting options.

nintegerOptional
Limit the number of random domains returned.
recently_viewedstringOptional

Sort domains by last update date (most recently updated first). Mutually exclusive with other sorting options.

recommendedstringOptional
Flag to retrieve recommended domains.
savedstringOptional

Filter to show only saved domains (requires authentication).

searchstringOptional
Search across domain name, summary, description, creator usernames, and tag names.
subcategorystringOptional
Filter domains by subcategory name.
tagstringOptional
Filter domains by a specific tag.

Request

This endpoint expects a multipart form.
idstringOptionalformat: "uuid"
domain_idintegerOptional
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)

tagslist of stringsOptional
created_byobjectOptional
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 nullOptional
subcategorystring or nullOptional
focus_areastring or nullOptional<=256 characters
visibilityenumOptional
* `public` - Public * `private` - Private * `team` - Team * `org` - Organization
Allowed values:
is_draftbooleanOptional
co_creatorslist of objectsOptional
creation_statusenumOptional
* `not_started` - Not Started * `in_progress` - In Progress * `completed` - Completed * `failed` - Failed
Allowed values:
savedbooleanOptional
metricsstringOptional
workspace_idintegerOptional
publicationmap from strings to any or nullOptional

Response

Domain details or list of 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
403
Forbidden Error
404
Not Found Error