Skip to content

GraphPatternMatch

Match patterns in the graph

Endpoint: /api/graph/graphpatternmatch

Tags: Graph

API Details

GET /api/graph/graphpatternmatch
schema: z.object({
tenantId: Str({ description: "ID of the tenant" }),
pattern: z.object({
nodes: z.array(z.object({
id: Str({ description: "Variable name for this node" }),
type: Str({ description: "Entity type" }).optional(),
properties: z.record(z.any()).optional(),
})),
relationships: z.array(z.object({
source: Str({ description: "Source node variable" }),
target: Str({ description: "Target node variable" }),
type: Str({ description: "Relationship type" }).optional(),
properties: z.record(z.any()).optional(),
})),
}),
returnVariables: z.array(Str({ description: "Variables to return" })).optional(),
}),

Returns the pattern matches

schema: z.object({
success: Bool(),
matches: z.array(z.record(z.any())),
count: z.number(),
}),

Bad request

schema: z.object({
success: Bool(),
error: Str(),
}),

Unauthorized

schema: z.object({
success: Bool(),
error: Str(),
}),

View Source