Skip to content

Edges API

/graphs/{graphId}/edges/{edgeType}

Terminal window
POST /graphs/{graphId}/edges/{edgeType}

Request body

{
"id": "edge_alice_bob",
"sourceId": "node_alice",
"targetId": "node_bob",
"data": { "since": "2024-01" }
}
  • sourceId and targetId must refer to existing nodes
  • data is validated against the edge type’s property schema

Response 201

{
"id": "edge_alice_bob",
"type": "KNOWS",
"sourceId": "node_alice",
"targetId": "node_bob",
"data": { "since": "2024-01" },
"createdAt": 1705312800000
}

Terminal window
GET /graphs/{graphId}/edges/{edgeType}/{edgeId}

Terminal window
DELETE /graphs/{graphId}/edges/{edgeType}/{edgeId}

Response 204 — no body.


Terminal window
GET /graphs/{graphId}/edges/{edgeType}?sourceId={id}&targetId={id}
ParameterDescription
sourceIdFilter edges by source node
targetIdFilter edges by target node
limitMax edges to return (default 50)