我可以通过get / post向neo4j浏览器发送一个密码查询吗?

时间:2014-06-05 14:25:03

标签: rest browser neo4j cypher

如何将(以编程方式)cypher查询发送到neo4j浏览器(通过get / post)以显示结果图? 例如:http://localhost:7474/browser/query='match n return n'

1 个答案:

答案 0 :(得分:1)

Yes, you can

示例请求

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" : {
  }
}

回复示例

200: OK
Content-Type: application/json; charset=UTF-8
{
  "columns" : [ "type(r)", "n.name", "n.age" ],
  "data" : [ [ "know", "him", 25 ], [ "know", "you", null ] ]
}