Is it possible to send the neo4j browser to a cypher request via get / post?

How can I send (programmatically) a cypher request to the neo4j browser (via get / post) to display the graph below? eg:http://localhost:7474/browser/query='match n return n'

+4
source share
1 answer

Yes you can .

Request example

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

Response example

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

Source: https://habr.com/ru/post/1543421/


All Articles