Create domain
Domain object.
Request body
Display name of the domain.
CSS color for the domain (e.g.,
"#3B82F6" or "blue").URL to a banner or representative image for the domain.
URL to an icon image for the domain.
Ordered list of subdomain names to create within this domain. Pass an empty array if no subdomains are needed yet.
Response
Returns the createdDomain object.
ObjectId string of the newly created domain.
Display name of the domain.
CSS color associated with the domain.
Image URL. Empty string if not provided.
Icon URL. Empty string if not provided.
List of subdomain names for this domain.
Examples
Sample response
200
Upload domain icon
icon field is then updated automatically.
This endpoint requires the knowledge-base service to be running at
http://knowledge-base:8080. If the service is unavailable, the upload will fail and the domain’s icon will not be updated.Path parameters
ObjectId string of the domain. Returns
400 if not a valid ObjectId format.Request body
Send the file asmultipart/form-data.
The icon image file to upload.
Response
Response from the knowledge-base service.
The updated
Domain object with the new icon URL applied.Errors
| Status | Condition |
|---|---|
400 | domain_id is not a valid ObjectId format |
404 | Domain with the given ID does not exist |
Example
Sample response
200
Upload domain image
image field is then updated automatically.
This endpoint requires the knowledge-base service to be running at
http://knowledge-base:8080. If the service is unavailable, the upload will fail and the domain’s image will not be updated.Path parameters
ObjectId string of the domain. Returns
400 if not a valid ObjectId format.Request body
Send the file asmultipart/form-data.
The image file to upload.
Response
Response from the knowledge-base service.
The updated
Domain object with the new image URL applied.Errors
| Status | Condition |
|---|---|
400 | domain_id is not a valid ObjectId format |
404 | Domain with the given ID does not exist |
Example
Sample response
200