跳转到内容
EN

更新节点

PATCH /ontology/v1/nodes/{node_id}

Change a node’s name, aliases or description when the mirrored record was renamed, without touching its type or identity. Send only the fields to change; omitted fields keep their current values and an explicitly null description clears it. Repeating the same edit converges on the same node, so this needs no Idempotency-Key.

支持状态: supported

参数

名称位置类型必填说明
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.

请求体 (application/json)

必填: true

名称类型说明
namestringNew display name, at most 200 characters; omit to keep the current name.
aliasesarray<string>Replacement alias list; an empty array clears the aliases and omitting the field keeps them.
descriptionstringReplacement profile, at most 500 characters; an explicit null clears it and omitting the field keeps it.
{
"type": "object",
"description": "The fields to change; omitted fields keep their current values.",
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"description": "New display name, at most 200 characters; omit to keep the current name.",
"example": "李总(华东)"
},
"aliases": {
"type": "array",
"description": "Replacement alias list; an empty array clears the aliases and omitting the field keeps them.",
"items": {
"type": "string",
"example": "李总"
},
"example": [
"李总"
]
},
"description": {
"type": "string",
"maxLength": 500,
"nullable": true,
"description": "Replacement profile, at most 500 characters; an explicit null clears it and omitting the field keeps it.",
"example": "华东区的采购负责人,2026 年续约。"
}
}
}

响应

HTTP 200

The node after the update, with its new updated_at.

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.