I'm a bit confused about the traversal now. I'm not sure that I could do this
via REST API.

So basically, I have a basic graph like this

(ReferenceNode)---[rel:contains]--->(A)---[rel:knows]--->(B)

If I want to traverse from ReferenceNode to B, by return only B. Could I do
this via REST API? This is the curl that I'm using but I only get A as the
result.

curl -H Accept:application/json -H Content-Type:application/json -X POST -d
'{"order":"breadth
first","relationships":[{"type":"contains","direction":"out"},{"type":"knows","direction":"out"}]}}'
http://localhost:7474/db/data/node/0/traverse/node

This is what I got from cURL
[ {
  "outgoing_relationships" :
"http://localhost:7474/db/data/node/4/relationships/out";,
  "data" : {
    "name" : "A"
  },
  "traverse" : "http://localhost:7474/db/data/node/4/traverse/{returnType}";,
  "all_typed_relationships" :
"http://localhost:7474/db/data/node/4/relationships/all/{-list|&|types}",
  "property" : "http://localhost:7474/db/data/node/4/properties/{key}";,
  "self" : "http://localhost:7474/db/data/node/4";,
  "properties" : "http://localhost:7474/db/data/node/4/properties";,
  "outgoing_typed_relationships" :
"http://localhost:7474/db/data/node/4/relationships/out/{-list|&|types}",
  "incoming_relationships" :
"http://localhost:7474/db/data/node/4/relationships/in";,
  "extensions" : {
  },
  "create_relationship" :
"http://localhost:7474/db/data/node/4/relationships";,
  "all_relationships" :
"http://localhost:7474/db/data/node/4/relationships/all";,
  "incoming_typed_relationships" :
"http://localhost:7474/db/data/node/4/relationships/in/{-list|&|types}"
} ]

I tried using gremlin and I could do this, but I'm not sure about REST API.
I'm sorry I cause too much problem, but I'm a bit lost at the moment. 

Thank you so much. 

--
View this message in context: 
http://neo4j-user-list.438527.n3.nabble.com/Traverse-along-the-node-by-a-sequence-of-relationships-tp2964954p2964954.html
Sent from the Neo4J User List mailing list archive at Nabble.com.
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to