跳转到内容
EN

读取关系

GET /ontology/v1/relations/{relation_id}

Read one relation’s fact and both of its clocks — valid_at and invalid_at for when it was true in the world, created_at and expired_at for when it was recorded and retired. An id from another organization, or one that never existed, answers ONTOLOGY_EDGE_NOT_FOUND.

支持状态: supported

参数

名称位置类型必填说明
relation_idpathstringtrueRelation id returned by relations.list, relations.create or a changeset, in the form oed_ followed by 32 lowercase letters or digits; a node id is not accepted.

响应

HTTP 200

The relation, including its fact, endpoints and both clocks.

application/json

名称 类型 说明
id string Relation id, used by invalidation and later reads; treat it as opaque and do not parse it.
type string Registered relation type this fact was recorded as; it must admit both endpoints.
source string Node id the fact starts from.
target string Node id the fact points at.
fact string The relationship in one sentence, at most 280 characters, as it should be read back.
episodes array<object> Where this fact was learned, oldest first; each entry names the scope it came from and an optional time range.
episodes[].scope string Scope the experience belonged to, normally a session id.
episodes[].from string Start of the period the experience covered, when known; omit for a single moment.
episodes[].to string End of the period the experience covered, when known; omit for a single moment.
origin string Where the fact came from; the relation type must list this origin among the ones it accepts.
confidence number How strongly the fact is held, from 0 to 1; 1 is fully held and lower values fade faster.
owner string Member id whose content this fact is; null means it is readable organization-wide. Another member's relation reads as not found.
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.
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.
created_at string System time the fact was recorded, in ISO 8601 UTC.
expired_at string System time the fact was judged no longer true, which trails invalid_at; null while it still holds.
superseded_by string Relation id that replaced this one, when the invalidation named a successor; null when nothing replaced it.
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.