Merge Entities
POST /api/writing/entities/{entity_name}/merge
π Merge an entity into another entity
Merges the source entity (from path) into the target entity (from body). All references to the source entity in documents will be replaced with the target entity name.
Path Parameters:
entity_name: Source entity to merge (will be removed)
Request Body:
targetEntity: Target entity to merge into (will be kept)keepAliases: Whether to keep source name as alias (default: true)
Returns:
- EntityMergeResponse with merge details and documents_updated count
Raises:
HTTPException 500: If merge fails
Example Request:
{
"targetEntity": "Aragorn",
"keepAliases": true
}Parameters
Section titled β Parameters βPath Parameters
Section titled βPath Parameters βRequest Body required
Section titled βRequest Body required βRequest model for merging entities.
Fields: target_entity: Entity to merge into (keeps this entity) keep_aliases: Whether to keep source entity name as alias of target
Used By: - POST /api/writing/entities/merge endpoint - Entity merge dialog
object
Keep source as alias
Responses
Section titled β Responses βSuccessful Response
Response from merging entities.
Fields: status: Operation status source_entity: Entity that was merged (removed) target_entity: Entity that received the merge documents_updated: Number of documents with updated references message: Status message
Used By: - POST /api/writing/entities/merge endpoint response
Validation Error