Skip to content

Edges & Graph

Show:

Bucket edges represent relationships between nodes inside a bucket, such as supersedes, references, or part_of. The v1 routes that read and write these edges directly are no longer a public consumer API.

Note: Do not use these routes in new integrations. Schift may still use relationship signals internally during search, but raw graph edges are not a supported public surface. Use v2 bucket search for user-facing retrieval.

VersionStatusNotes
v1DeprecatedDirect edge mutation routes. Kept for existing internal callers only.
v2CurrentRetrieve related content via bucket search.

Add edges to a bucket.

Note: This endpoint is deprecated and is not included in the public OpenAPI schema.

NameTypeDescription
bucket_idstringUUID of the bucket.
NameTypeRequiredDescription
edgesarrayYesUp to 10,000 edge objects.
edges[].sourcestringYesSource node ID.
edges[].targetstringYesTarget node ID.
edges[].relationstringNoOne of contradicts, supersedes, caused_by, is_a, related_to (default), has_child, follows, references, summarizes, alias_of, part_of.
edges[].weightnumberNoConfidence weight from 0.0 to 1.0. Defaults to 1.0.
Terminal window
curl -X POST ${API_BASE_URL:-https://api.schift.io}/v1/buckets/550e8400-e29b-41d4-a716-446655440000/edges \
-H "Authorization: Bearer $SCHIFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"edges": [
{
"source": "node-1",
"target": "node-2",
"relation": "supersedes",
"weight": 0.95
}
]
}'
{
"count": 1
}
// 400 invalid_relation_type
{
"error": "invalid_relation_type",
"unknown_relation_types": ["supersedes"]
}
// 402 Payment Required
{
"allowed": false,
"reason": "quota_exceeded"
}
// 403 Forbidden
{
"detail": "Ingest quota unavailable. Upgrade your plan."
}
// 404 Not Found
{
"detail": "Bucket not found"
}

GET /v1/buckets/{bucket_id}/edges/{node_id}

Section titled “GET /v1/buckets/{bucket_id}/edges/{node_id}”

List edges connected to a node.

Note: This endpoint is deprecated and is not included in the public OpenAPI schema.

NameTypeDescription
bucket_idstringUUID of the bucket.
node_idstringNode ID to query.
NameTypeRequiredDescription
directionstringNooutgoing (default), incoming, or both.
relationstringNoFilter to a single relation type. Must be defined in the bucket ontology.
Terminal window
curl -G ${API_BASE_URL:-https://api.schift.io}/v1/buckets/550e8400-e29b-41d4-a716-446655440000/edges/node-1 \
-H "Authorization: Bearer $SCHIFT_API_KEY" \
-d "direction=both" \
-d "relation=supersedes"
{
"node_id": "node-1",
"direction": "both",
"edges": [
{
"source": "node-1",
"target": "node-2",
"relation": "supersedes",
"weight": 0.95
}
]
}
// 400 invalid_relation_type
{
"error": "invalid_relation_type",
"unknown_relation_types": ["supersedes"]
}
// 404 Not Found
{
"detail": "Bucket not found"
}

Delete a specific edge.

Note: This endpoint is deprecated and is not included in the public OpenAPI schema.

NameTypeDescription
bucket_idstringUUID of the bucket.
NameTypeRequiredDescription
sourcestringYesSource node ID.
targetstringYesTarget node ID.
relationstringNoRelation type. Defaults to related_to. Must be defined in the bucket ontology.
Terminal window
curl -X DELETE ${API_BASE_URL:-https://api.schift.io}/v1/buckets/550e8400-e29b-41d4-a716-446655440000/edges \
-H "Authorization: Bearer $SCHIFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "node-1",
"target": "node-2",
"relation": "supersedes"
}'

204 No Content on success.

// 400 invalid_relation_type
{
"error": "invalid_relation_type",
"unknown_relation_types": ["supersedes"]
}
// 404 Not Found
{
"detail": "Bucket not found"
}

Instead of reading raw edges, submit a natural-language query to the v2 search endpoint:

Terminal window
curl -X POST ${API_BASE_URL:-https://api.schift.io}/v2/buckets/550e8400-e29b-41d4-a716-446655440000/search \
-H "Authorization: Bearer $SCHIFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "Which policy supersedes the old refund rule?",
"top_k": 8,
"options": {
"rerank": {"enabled": true}
}
}'