问题
How can I send (programatically) a cypher query to neo4j browser (via get/post) in order to display the resulted graph?
e.g., something like: http://localhost:7474/browser/query='match n return n'
回答1:
Yes, you can.
Example request
POST http://localhost:7474/db/data/cypher
Accept: application/json; charset=UTF-8
Content-Type: application/json
{
"query" : "MATCH (x {name: 'I'})-[r]->(n) RETURN type(r), n.name, n.age",
"params" : {
}
}
Example response
200: OK
Content-Type: application/json; charset=UTF-8
{
"columns" : [ "type(r)", "n.name", "n.age" ],
"data" : [ [ "know", "him", 25 ], [ "know", "you", null ] ]
}
来源:https://stackoverflow.com/questions/24062795/can-i-send-neo4j-browser-a-cypher-query-via-get-post