{
"title": "Generic Ingest Edge",
"description": "Defines an edge between two nodes in a generic graph ingestion system. Each edge specifies a start and end node using either a unique identifier (id) or a name-based lookup. A kind is required to indicate the relationship type. Optional properties may include custom attributes. You may optionally constrain the start or end node to a specific kind using the kind field inside each reference.",
"type": "object",
"properties": {
"start": {
"type": "object",
"properties": {
"match_by": {
"type": "string",
"enum": ["id", "name"],
"default": "id",
"description": "Whether to match the start node by its unique object ID or by its name property."
},
"value": {
"type": "string",
"description": "The value used for matching — either an object ID or a name, depending on match_by."
},
"kind": {
"type": "string",
"description": "Optional kind filter; the referenced node must have this kind."
}
},
"required": ["value"]
},
"end": {
"type": "object",
"properties": {
"match_by": {
"type": "string",
"enum": ["id", "name"],
"default": "id",
"description": "Whether to match the end node by its unique object ID or by its name property."
},
"value": {
"type": "string",
"description": "The value used for matching — either an object ID or a name, depending on match_by."
},
"kind": {
"type": "string",
"description": "Optional kind filter; the referenced node must have this kind."
}
},
"required": ["value"]
},
"kind": { "type": "string" },
"properties": {
"type": ["object", "null"],
"description": "A key-value map of edge attributes. Values must not be objects. If a value is an array, it must contain only primitive types (e.g., strings, numbers, booleans) and must be homogeneous (all items must be of the same type).",
"additionalProperties": {
"type": ["string", "number", "boolean", "array"],
"items": {
"not": {
"type": "object"
}
}
}
}
},
"required": ["start", "end", "kind"],
"examples": [
{
"start": {
"match_by": "id",
"value": "user-1234"
},
"end": {
"match_by": "id",
"value": "server-5678"
},
"kind": "HasSession",
"properties": {
"timestamp": "2025-04-16T12:00:00Z",
"duration_minutes": 45
}
},
{
"start": {
"match_by": "name",
"value": "alice",
"kind": "User"
},
"end": {
"match_by": "name",
"value": "file-server-1",
"kind": "Server"
},
"kind": "AccessedResource",
"properties": {
"via": "SMB",
"sensitive": true
}
},
{
"start": {
"value": "admin-1"
},
"end": {
"value": "domain-controller-9"
},
"kind": "AdminTo",
"properties": {
"reason": "elevated_permissions",
"confirmed": false
}
},
{
"start": {
"match_by": "name",
"value": "Printer-007"
},
"end": {
"match_by": "id",
"value": "network-42"
},
"kind": "ConnectedTo",
"properties": null
}
]
}