合并节点
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.
支持状态: supported
参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| node_id | path | string | true | Node 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-Key | header | string | true | Unique key for this merge, at most 255 characters; resend the same key to replay the first result instead of merging twice. |
请求体 (application/json)
必填: true
| 名称 | 类型 | 说明 |
|---|---|---|
| into | string | Node 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" } }}响应
HTTP 200
The surviving node that the merged id now resolves to.
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| 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. |