6.12. Cypher Plugin

6.12.1. Send a Query

The Neo4j Cypher Plugin enables querying with the Chapter 4, Cypher Query Language possible. The results are returned as a list of string headers (columns), and a data part, consisting of a list of all rows, every row consisting of a list of REST representations of the field value - Node, Relationship or any simple value like String.

6.12.1. Send a Query

A simple query returning all nodes connected to node 1, returning the node and the name property, if it exists, otherwise null:

Example request

  • POST http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query
  • Accept: application/json
  • Content-Type: application/json
{"query": "start x  = (3) match (x) --> (n) return n.name?, n.age?"}

Example response

  • 200: OK
  • Content-Type: application/json
{
  "data" : [ [ "you", null ], [ "him", null ] ],
  "columns" : [ "n.name", "n.age" ]
}