Skip to content

Create Knowledge Edge

POST /knowledge-edges

Draw a relation by hand. It lands confirmed: a person drew it deliberately.

A part_of edge that would close a cycle is a 422 (RULE KE-2), and a pair that already has this relation is a 409 rather than a silent no-op — the maintenance pass skips a related pair on purpose, and a human asking twice deserves to be told the answer.

FieldTypeNotes
from_item_idstring (uuid)required—
to_item_idstring (uuid)required—
kindpart_of | supports | contradicts | derived_from | supersedes | relates_to | answers | shares_topicrequired—
statusproposed | confirmed | rejected | nulloptional—
criticalitylow | normal | highoptionalDefault "normal".
notesstring | nulloptional—
knowledge_setstring | nulloptionalmin length 1 max length 120
StatusDescriptionBody
201Successful ResponseKnowledgeEdgeView
422Validation ErrorHTTPValidationError

The body shows the fields the schema always carries. Which combination is legal is a service rule the schema cannot express, so read the description above before copying this.

Terminal window
curl -X POST https://your-deployment.example.com/knowledge-edges \
-H "Authorization: Bearer $COBRE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from_item_id": "0190a2f4-0000-7000-8000-000000000000",
"to_item_id": "0190a2f4-0000-7000-8000-000000000000",
"kind": "part_of"
}'
FieldTypeNotes
idstring (uuid)required—
from_item_idstring (uuid)required—
to_item_idstring (uuid)required—
kindpart_of | supports | contradicts | derived_from | supersedes | relates_to | answers | shares_topicrequired—
statusproposed | confirmed | rejectedrequired—
criticalitylow | normal | highrequired—
notesstring | nullrequired, nullable—
created_byagent | human | maintenancerequired—
curated_by_idstring (uuid) | nullrequired, nullable—
curated_atstring (date-time) | nullrequired, nullable—
created_atstring (date-time)required—
updated_atstring (date-time)required—