Skip to content
中文

Merge node

POST /ontology/v1/nodes/{node_id}/merge

Fold a duplicate node into the node that should survive, when two records are discovered to be the same entity. The merged node’s relations and aliases move to the survivor and later reads of the duplicate resolve to it. Send an Idempotency-Key header; repeating the same key replays the first result. Reversal is a staff operation, not available here.

Support: supported

Parameters

NameLocationTypeRequiredDescription
node_idpathstringtrueNode id returned by nodes.list, nodes.create or a changeset, in the form ond_ followed by 32 lowercase letters or digits; a name or an external record id is not accepted.
Idempotency-KeyheaderstringtrueUnique key for this merge, at most 255 characters; resend the same key to replay the first result instead of merging twice.

Request body (application/json)

Required: true

NameTypeDescription
intostringNode id that should survive, from nodes.list or search; the merged node’s relations and aliases move to it.
{
"type": "object",
"required": [
"into"
],
"description": "The survivor the merged node folds into.",
"properties": {
"into": {
"type": "string",
"description": "Node id that should survive, from nodes.list or search; the merged node's relations and aliases move to it.",
"example": "ond_fedcba9876543210fedcba9876543210"
}
}
}

Response

HTTP 200

The surviving node that the merged id now resolves to.

application/json

Name Type Description
id string Node id, used by relations, merges and later reads; treat it as opaque and do not parse it.
type string Registered node type this entity was recorded as; it never changes after creation.
ref string Id of the mirrored record in the service that owns it, matching the type's ref_prefix; null for a concept with no external record.
name string Display name of the entity, at most 200 characters.
aliases array<string> Other names this entity is known by; they are matched by search alongside the name.
description string Profile of the entity, at most 500 characters; null when none was recorded.
owner string Member id whose content this is; null means it is readable organization-wide. Another member's node comes back restricted.
merged_into string When this node was merged into another, that survivor's id; reads of a merged node resolve to the survivor.
created_at string System time when the node was first recorded, in ISO 8601 UTC.
updated_at string System time of the last change to this node's content, in ISO 8601 UTC.
deleted_at string System time the mirrored record was deleted, when that is known; kept so history stays answerable.