Run cypher on stream
Run cypher on stream to get data as required.
Method : POST
URI : /stream/<schema_name>/<stream_name>/graph/query
Body : Cypher query
To get all the triples for visitor v1, where v1 BUYS product (any product)
curl -H "Content-Type: application/json" -d's=>(vid:v1)-[BUYS]->(prod:*)' -X POST http://192.168.1.105:18080/stream/website/visitor/graph/query
Response
{
"triple":[
{
"sub":"vid:v1",
"pred":"BUYS",
"obj":"prod:p2"
},
{
"sub":"vid:v1",
"pred":"BUYS",
"obj":"prod:p2"
},
{
"sub":"vid:v1",
"pred":"BUYS",
"obj":"prod:p3"
},
{
"sub":"vid:v1",
"pred":"BUYS",
"obj":"prod:p1"
},
{
"sub":"vid:v1",
"pred":"BUYS",
"obj":"prod:p1"
}
],
"num_items":5
}