读取节点
GET /ontology/v1/nodes/{node_id}
Read one node’s content and, with expand=relations, every relation on and around it. as_of reads the node as it was at that time. A node id from another organization, or one that never existed, answers ONTOLOGY_NODE_NOT_FOUND; a node you may reach but not read returns restricted true with its name only.
支持状态: 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. |
| expand | query | string | false | Set to relations to include the node’s incoming and outgoing relations in the same response; omit for the node alone. |
| as_of | query | string | false | ISO 8601 timestamp; read the node and its relations as they were then, including relations invalidated since. Omit to read current state. |
响应
HTTP 200
The node, plus a relations array when expand=relations was requested.
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. |
| relations | array<object> | Relations on and around this node that the caller may read, ordered by relation id; present only when expand=relations was sent. |
| relations[].id | string | Relation id, used by invalidation and later reads; treat it as opaque and do not parse it. |
| relations[].type | string | Registered relation type this fact was recorded as; it must admit both endpoints. |
| relations[].source | string | Node id the fact starts from. |
| relations[].target | string | Node id the fact points at. |
| relations[].fact | string | The relationship in one sentence, at most 280 characters, as it should be read back. |
| relations[].episodes | array<object> | Where this fact was learned, oldest first; each entry names the scope it came from and an optional time range. |
| relations[].origin | string | Where the fact came from; the relation type must list this origin among the ones it accepts. |
| relations[].confidence | number | How strongly the fact is held, from 0 to 1; 1 is fully held and lower values fade faster. |
| relations[].owner | string | Member id whose content this fact is; null means it is readable organization-wide. Another member's relation reads as not found. |
| relations[].valid_at | string | World time the fact became true; null when it was never dated, in which case treat it as true since it was recorded. |
| relations[].invalid_at | string | World time the fact stopped being true; null while it still holds. The relation is kept and reads at an earlier as_of. |
| relations[].created_at | string | System time the fact was recorded, in ISO 8601 UTC. |
| relations[].expired_at | string | System time the fact was judged no longer true, which trails invalid_at; null while it still holds. |
| relations[].superseded_by | string | Relation id that replaced this one, when the invalidation named a successor; null when nothing replaced it. |
| relations[].archived_at | string | System time the fact was archived out of spreading; null while it still spreads, and reads by time still reach it either way. |