20.6. Legacy Cypher HTTP endpoint

[Note]Note

This endpoint is deprecated. Please transition to using the new transactional endpoint (see Section 20.1, “Transactional Cypher HTTP endpoint”). Among other things it allows you to run multiple Cypher statements in the same transaction.

The Neo4j REST API allows querying with Cypher, see Cypher Query Language. 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, Path or any simple value like String.

[Tip]Tip

In order to speed up queries in repeated scenarios, try not to use literals but replace them with parameters wherever possible in order to let the server cache query plans, see the section called “Use parameters” for details. Also see Section 8.5, “Parameters” for where parameters can be used.

Use parameters

Cypher supports queries with parameters which are submitted as JSON.

MATCH (x { name: { startName }})-[r]-(friend)
WHERE friend.name = { name }
RETURN TYPE(r)

Figure 20.2. Final Graph

Example request

  • POST http://localhost:7474/db/data/cypher
  • Accept: application/json; charset=UTF-8
  • Content-Type: application/json
{
  "query" : "MATCH (x {name: {startName}})-[r]-(friend) WHERE friend.name = {name} RETURN TYPE(r)",
  "params" : {
    "startName" : "I",
    "name" : "you"
  }
}

Example response

  • 200: OK
  • Content-Type: application/json; charset=UTF-8
{
  "columns" : [ "TYPE(r)" ],
  "data" : [ [ "know" ] ]
}

Create a node

Create a node with a label and a property using Cypher. See the request for the parameter sent with the query.

CREATE (n:Person { name : { name }})
RETURN n

Figure 20.3. Final Graph

Example request

  • POST http://localhost:7474/db/data/cypher
  • Accept: application/json; charset=UTF-8
  • Content-Type: application/json
{
  "query" : "CREATE (n:Person { name : {name} }) RETURN n",
  "params" : {
    "name" : "Andres"
  }
}

Example response

  • 200: OK
  • Content-Type: application/json; charset=UTF-8
{
  "columns" : [ "n" ],
  "data" : [ [ {
    "metadata" : {
      "id" : 147,
      "labels" : [ "Person" ]
    },
    "data" : {
      "name" : "Andres"
    },
    "paged_traverse" : "http://localhost:7474/db/data/node/147/paged/traverse/{returnType}{?pageSize,leaseTime}",
    "outgoing_relationships" : "http://localhost:7474/db/data/node/147/relationships/out",
    "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/147/relationships/out/{-list|&|types}",
    "create_relationship" : "http://localhost:7474/db/data/node/147/relationships",
    "labels" : "http://localhost:7474/db/data/node/147/labels",
    "traverse" : "http://localhost:7474/db/data/node/147/traverse/{returnType}",
    "extensions" : { },
    "all_relationships" : "http://localhost:7474/db/data/node/147/relationships/all",
    "all_typed_relationships" : "http://localhost:7474/db/data/node/147/relationships/all/{-list|&|types}",
    "property" : "http://localhost:7474/db/data/node/147/properties/{key}",
    "self" : "http://localhost:7474/db/data/node/147",
    "incoming_relationships" : "http://localhost:7474/db/data/node/147/relationships/in",
    "properties" : "http://localhost:7474/db/data/node/147/properties",
    "incoming_typed_relationships" : "http://localhost:7474/db/data/node/147/relationships/in/{-list|&|types}"
  } ] ]
}

Create a node with multiple properties

Create a node with a label and multiple properties using Cypher. See the request for the parameter sent with the query.

CREATE (n:Person { props })
RETURN n

Figure 20.4. Final Graph

Example request

  • POST http://localhost:7474/db/data/cypher
  • Accept: application/json; charset=UTF-8
  • Content-Type: application/json
{
  "query" : "CREATE (n:Person { props } ) RETURN n",
  "params" : {
    "props" : {
      "position" : "Developer",
      "name" : "Michael",
      "awesome" : true,
      "children" : 3
    }
  }
}

Example response

  • 200: OK
  • Content-Type: application/json; charset=UTF-8
{
  "columns" : [ "n" ],
  "data" : [ [ {
    "metadata" : {
      "id" : 144,
      "labels" : [ "Person" ]
    },
    "data" : {
      "awesome" : true,
      "children" : 3,
      "name" : "Michael",
      "position" : "Developer"
    },
    "paged_traverse" : "http://localhost:7474/db/data/node/144/paged/traverse/{returnType}{?pageSize,leaseTime}",
    "outgoing_relationships" : "http://localhost:7474/db/data/node/144/relationships/out",
    "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/144/relationships/out/{-list|&|types}",
    "create_relationship" : "http://localhost:7474/db/data/node/144/relationships",
    "labels" : "http://localhost:7474/db/data/node/144/labels",
    "traverse" : "http://localhost:7474/db/data/node/144/traverse/{returnType}",
    "extensions" : { },
    "all_relationships" : "http://localhost:7474/db/data/node/144/relationships/all",
    "all_typed_relationships" : "http://localhost:7474/db/data/node/144/relationships/all/{-list|&|types}",
    "property" : "http://localhost:7474/db/data/node/144/properties/{key}",
    "self" : "http://localhost:7474/db/data/node/144",
    "incoming_relationships" : "http://localhost:7474/db/data/node/144/relationships/in",
    "properties" : "http://localhost:7474/db/data/node/144/properties",
    "incoming_typed_relationships" : "http://localhost:7474/db/data/node/144/relationships/in/{-list|&|types}"
  } ] ]
}

Create multiple nodes with properties

Create multiple nodes with properties using Cypher. See the request for the parameter sent with the query.

UNWIND { props } AS properties
CREATE (n:Person)
SET n = properties
RETURN n

Figure 20.5. Final Graph

Example request

  • POST http://localhost:7474/db/data/cypher
  • Accept: application/json; charset=UTF-8
  • Content-Type: application/json
{
  "query" : "UNWIND {props} AS properties CREATE (n:Person) SET n = properties RETURN n",
  "params" : {
    "props" : [ {
      "name" : "Andres",
      "position" : "Developer"
    }, {
      "name" : "Michael",
      "position" : "Developer"
    } ]
  }
}

Example response

  • 200: OK
  • Content-Type: application/json; charset=UTF-8
{
  "columns" : [ "n" ],
  "data" : [ [ {
    "metadata" : {
      "id" : 148,
      "labels" : [ "Person" ]
    },
    "data" : {
      "name" : "Andres",
      "position" : "Developer"
    },
    "paged_traverse" : "http://localhost:7474/db/data/node/148/paged/traverse/{returnType}{?pageSize,leaseTime}",
    "outgoing_relationships" : "http://localhost:7474/db/data/node/148/relationships/out",
    "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/148/relationships/out/{-list|&|types}",
    "create_relationship" : "http://localhost:7474/db/data/node/148/relationships",
    "labels" : "http://localhost:7474/db/data/node/148/labels",
    "traverse" : "http://localhost:7474/db/data/node/148/traverse/{returnType}",
    "extensions" : { },
    "all_relationships" : "http://localhost:7474/db/data/node/148/relationships/all",
    "all_typed_relationships" : "http://localhost:7474/db/data/node/148/relationships/all/{-list|&|types}",
    "property" : "http://localhost:7474/db/data/node/148/properties/{key}",
    "self" : "http://localhost:7474/db/data/node/148",
    "incoming_relationships" : "http://localhost:7474/db/data/node/148/relationships/in",
    "properties" : "http://localhost:7474/db/data/node/148/properties",
    "incoming_typed_relationships" : "http://localhost:7474/db/data/node/148/relationships/in/{-list|&|types}"
  } ], [ {
    "metadata" : {
      "id" : 149,
      "labels" : [ "Person" ]
    },
    "data" : {
      "name" : "Michael",
      "position" : "Developer"
    },
    "paged_traverse" : "http://localhost:7474/db/data/node/149/paged/traverse/{returnType}{?pageSize,leaseTime}",
    "outgoing_relationships" : "http://localhost:7474/db/data/node/149/relationships/out",
    "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/149/relationships/out/{-list|&|types}",
    "create_relationship" : "http://localhost:7474/db/data/node/149/relationships",
    "labels" : "http://localhost:7474/db/data/node/149/labels",
    "traverse" : "http://localhost:7474/db/data/node/149/traverse/{returnType}",
    "extensions" : { },
    "all_relationships" : "http://localhost:7474/db/data/node/149/relationships/all",
    "all_typed_relationships" : "http://localhost:7474/db/data/node/149/relationships/all/{-list|&|types}",
    "property" : "http://localhost:7474/db/data/node/149/properties/{key}",
    "self" : "http://localhost:7474/db/data/node/149",
    "incoming_relationships" : "http://localhost:7474/db/data/node/149/relationships/in",
    "properties" : "http://localhost:7474/db/data/node/149/properties",
    "incoming_typed_relationships" : "http://localhost:7474/db/data/node/149/relationships/in/{-list|&|types}"
  } ] ]
}

Set all properties on a node using Cypher

Set all properties on a node.

CREATE (n:Person { name: 'this property is to be deleted' })
SET n = { props }
RETURN n

Figure 20.6. Final Graph

Example request

  • POST http://localhost:7474/db/data/cypher
  • Accept: application/json; charset=UTF-8
  • Content-Type: application/json
{
  "query" : "CREATE (n:Person { name: 'this property is to be deleted' } ) SET n = { props } RETURN n",
  "params" : {
    "props" : {
      "position" : "Developer",
      "firstName" : "Michael",
      "awesome" : true,
      "children" : 3
    }
  }
}

Example response

  • 200: OK
  • Content-Type: application/json; charset=UTF-8
{
  "columns" : [ "n" ],
  "data" : [ [ {
    "metadata" : {
      "id" : 175,
      "labels" : [ "Person" ]
    },
    "data" : {
      "awesome" : true,
      "firstName" : "Michael",
      "children" : 3,
      "position" : "Developer"
    },
    "paged_traverse" : "http://localhost:7474/db/data/node/175/paged/traverse/{returnType}{?pageSize,leaseTime}",
    "outgoing_relationships" : "http://localhost:7474/db/data/node/175/relationships/out",
    "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/175/relationships/out/{-list|&|types}",
    "create_relationship" : "http://localhost:7474/db/data/node/175/relationships",
    "labels" : "http://localhost:7474/db/data/node/175/labels",
    "traverse" : "http://localhost:7474/db/data/node/175/traverse/{returnType}",
    "extensions" : { },
    "all_relationships" : "http://localhost:7474/db/data/node/175/relationships/all",
    "all_typed_relationships" : "http://localhost:7474/db/data/node/175/relationships/all/{-list|&|types}",
    "property" : "http://localhost:7474/db/data/node/175/properties/{key}",
    "self" : "http://localhost:7474/db/data/node/175",
    "incoming_relationships" : "http://localhost:7474/db/data/node/175/relationships/in",
    "properties" : "http://localhost:7474/db/data/node/175/properties",
    "incoming_typed_relationships" : "http://localhost:7474/db/data/node/175/relationships/in/{-list|&|types}"
  } ] ]
}

Send a query

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

MATCH (x { name: 'I' })-[r]->(n)
RETURN type(r), n.name, n.age

Figure 20.7. Final Graph

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 ] ]
}

Return paths

Paths can be returned just like other return types.

MATCH path =(x { name: 'I' })--(friend)
RETURN path, friend.name

Figure 20.8. Final Graph

Example request

  • POST http://localhost:7474/db/data/cypher
  • Accept: application/json; charset=UTF-8
  • Content-Type: application/json
{
  "query" : "MATCH path = (x {name: 'I'})--(friend) RETURN path, friend.name",
  "params" : { }
}

Example response

  • 200: OK
  • Content-Type: application/json; charset=UTF-8
{
  "columns" : [ "path", "friend.name" ],
  "data" : [ [ {
    "relationships" : [ "http://localhost:7474/db/data/relationship/51" ],
    "nodes" : [ "http://localhost:7474/db/data/node/173", "http://localhost:7474/db/data/node/174" ],
    "directions" : [ "->" ],
    "start" : "http://localhost:7474/db/data/node/173",
    "length" : 1,
    "end" : "http://localhost:7474/db/data/node/174"
  }, "you" ] ]
}

Nested results

When sending queries that return nested results like list and maps, these will get serialized into nested JSON representations according to their types.

MATCH (n)
WHERE n.name IN ['I', 'you']
RETURN collect(n.name)

Figure 20.9. Final Graph

Example request

  • POST http://localhost:7474/db/data/cypher
  • Accept: application/json; charset=UTF-8
  • Content-Type: application/json
{
  "query" : "MATCH (n) WHERE n.name in ['I', 'you'] RETURN collect(n.name)",
  "params" : { }
}

Example response

  • 200: OK
  • Content-Type: application/json; charset=UTF-8
{
  "columns" : [ "collect(n.name)" ],
  "data" : [ [ [ "I", "you" ] ] ]
}

Retrieve query metadata

By passing in an additional GET parameter when you execute Cypher queries, metadata about the query will be returned, such as how many labels were added or removed by the query.

MATCH (n { name: 'I' })
SET n:Actor
REMOVE n:Director
RETURN labels(n)

Figure 20.10. Final Graph

Example request

  • POST http://localhost:7474/db/data/cypher?includeStats=true
  • Accept: application/json; charset=UTF-8
  • Content-Type: application/json
{
  "query" : "MATCH (n {name: 'I'}) SET n:Actor REMOVE n:Director RETURN labels(n)",
  "params" : { }
}

Example response

  • 200: OK
  • Content-Type: application/json; charset=UTF-8
{
  "columns" : [ "labels(n)" ],
  "data" : [ [ [ "Actor" ] ] ],
  "stats" : {
    "nodes_deleted" : 0,
    "relationship_deleted" : 0,
    "nodes_created" : 0,
    "labels_added" : 1,
    "relationships_created" : 0,
    "indexes_added" : 0,
    "properties_set" : 0,
    "contains_updates" : true,
    "indexes_removed" : 0,
    "constraints_added" : 0,
    "labels_removed" : 1,
    "constraints_removed" : 0
  }
}

Errors

Errors on the server will be reported as a JSON-formatted message, exception name and stacktrace.

MATCH (x { name: 'I' })
RETURN x.dummy/0

Figure 20.11. Final Graph

Example request

  • POST http://localhost:7474/db/data/cypher
  • Accept: application/json; charset=UTF-8
  • Content-Type: application/json
{
  "query" : "MATCH (x {name: 'I'}) RETURN x.dummy/0",
  "params" : { }
}

Example response

  • 400: Bad Request
  • Content-Type: application/json; charset=UTF-8
{
  "message": "/ by zero",
  "exception": "BadInputException",
  "fullname": "org.neo4j.server.rest.repr.BadInputException",
  "stackTrace": [
    "org.neo4j.server.rest.repr.RepresentationExceptionHandlingIterable.exceptionOnNext(RepresentationExceptionHandlingIterable.java:39)",
    "org.neo4j.helpers.collection.ExceptionHandlingIterable$1.next(ExceptionHandlingIterable.java:55)",
    "org.neo4j.helpers.collection.IteratorWrapper.next(IteratorWrapper.java:47)",
    "org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:64)",
    "org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:75)",
    "org.neo4j.server.rest.repr.MappingSerializer.putList(MappingSerializer.java:61)",
    "org.neo4j.server.rest.repr.CypherResultRepresentation.serialize(CypherResultRepresentation.java:58)",
    "org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:41)",
    "org.neo4j.server.rest.repr.OutputFormat.assemble(OutputFormat.java:235)",
    "org.neo4j.server.rest.repr.OutputFormat.formatRepresentation(OutputFormat.java:175)",
    "org.neo4j.server.rest.repr.OutputFormat.response(OutputFormat.java:158)",
    "org.neo4j.server.rest.repr.OutputFormat.ok(OutputFormat.java:71)",
    "org.neo4j.server.rest.web.CypherService.cypher(CypherService.java:138)",
    "java.lang.reflect.Method.invoke(Method.java:497)",
    "org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:145)",
    "org.neo4j.server.rest.dbms.AuthorizationDisabledFilter.doFilter(AuthorizationDisabledFilter.java:48)",
    "org.neo4j.server.rest.web.CollectUserAgentFilter.doFilter(CollectUserAgentFilter.java:69)",
    "java.lang.Thread.run(Thread.java:745)"
  ],
  "cause": {
    "exception": "QueryExecutionException",
    "cause": {
      "exception": "QueryExecutionKernelException",
      "cause": {
        "exception": "ArithmeticException",
        "cause": {
          "exception": "ArithmeticException",
          "fullname": "org.neo4j.cypher.internal.frontend.v3_1.ArithmeticException",
          "stackTrace": [
            "org.neo4j.cypher.internal.compiler.v3_1.commands.expressions.Divide.apply(Divide.scala:36)",
            "org.neo4j.cypher.internal.compiler.v3_1.pipes.ProjectionPipe$$anonfun$internalCreateResults$1$$anonfun$apply$1.apply(ProjectionPipe.scala:48)",
            "org.neo4j.cypher.internal.compiler.v3_1.pipes.ProjectionPipe$$anonfun$internalCreateResults$1$$anonfun$apply$1.apply(ProjectionPipe.scala:46)",
            "scala.collection.immutable.Map$Map1.foreach(Map.scala:116)",
            "org.neo4j.cypher.internal.compiler.v3_1.pipes.ProjectionPipe$$anonfun$internalCreateResults$1.apply(ProjectionPipe.scala:46)",
            "org.neo4j.cypher.internal.compiler.v3_1.pipes.ProjectionPipe$$anonfun$internalCreateResults$1.apply(ProjectionPipe.scala:45)",
            "scala.collection.Iterator$$anon$11.next(Iterator.scala:409)",
            "scala.collection.Iterator$$anon$11.next(Iterator.scala:409)",
            "org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator$$anonfun$next$1.apply(ResultIterator.scala:70)",
            "org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator$$anonfun$next$1.apply(ResultIterator.scala:67)",
            "org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator$$anonfun$failIfThrows$1.apply(ResultIterator.scala:93)",
            "org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator.decoratedCypherException(ResultIterator.scala:102)",
            "org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator.failIfThrows(ResultIterator.scala:91)",
            "org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator.next(ResultIterator.scala:67)",
            "org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator.next(ResultIterator.scala:48)",
            "org.neo4j.cypher.internal.compiler.v3_1.PipeExecutionResult.next(PipeExecutionResult.scala:79)",
            "org.neo4j.cypher.internal.compiler.v3_1.PipeExecutionResult$$anon$2.next(PipeExecutionResult.scala:69)",
            "org.neo4j.cypher.internal.compiler.v3_1.PipeExecutionResult$$anon$2.next(PipeExecutionResult.scala:66)",
            "org.neo4j.cypher.internal.compatibility.ExecutionResultWrapperFor3_1$$anon$1$$anonfun$next$1.apply(CompatibilityFor3_1.scala:265)",
            "org.neo4j.cypher.internal.compatibility.ExecutionResultWrapperFor3_1$$anon$1$$anonfun$next$1.apply(CompatibilityFor3_1.scala:265)",
            "org.neo4j.cypher.internal.compatibility.exceptionHandlerFor3_1$.runSafely(CompatibilityFor3_1.scala:141)",
            "org.neo4j.cypher.internal.compatibility.ExecutionResultWrapperFor3_1$$anon$1.next(CompatibilityFor3_1.scala:264)",
            "org.neo4j.cypher.internal.compatibility.ExecutionResultWrapperFor3_1$$anon$1.next(CompatibilityFor3_1.scala:258)",
            "org.neo4j.cypher.internal.javacompat.ExecutionResult.next(ExecutionResult.java:241)",
            "org.neo4j.cypher.internal.javacompat.ExecutionResult.next(ExecutionResult.java:54)",
            "org.neo4j.helpers.collection.ExceptionHandlingIterable$1.next(ExceptionHandlingIterable.java:53)",
            "org.neo4j.helpers.collection.IteratorWrapper.next(IteratorWrapper.java:47)",
            "org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:64)",
            "org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:75)",
            "org.neo4j.server.rest.repr.MappingSerializer.putList(MappingSerializer.java:61)",
            "org.neo4j.server.rest.repr.CypherResultRepresentation.serialize(CypherResultRepresentation.java:58)",
            "org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:41)",
            "org.neo4j.server.rest.repr.OutputFormat.assemble(OutputFormat.java:235)",
            "org.neo4j.server.rest.repr.OutputFormat.formatRepresentation(OutputFormat.java:175)",
            "org.neo4j.server.rest.repr.OutputFormat.response(OutputFormat.java:158)",
            "org.neo4j.server.rest.repr.OutputFormat.ok(OutputFormat.java:71)",
            "org.neo4j.server.rest.web.CypherService.cypher(CypherService.java:138)",
            "java.lang.reflect.Method.invoke(Method.java:497)",
            "org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:145)",
            "org.neo4j.server.rest.dbms.AuthorizationDisabledFilter.doFilter(AuthorizationDisabledFilter.java:48)",
            "org.neo4j.server.rest.web.CollectUserAgentFilter.doFilter(CollectUserAgentFilter.java:69)",
            "java.lang.Thread.run(Thread.java:745)"
          ],
          "errors": [
            {
              "code": "Neo.DatabaseError.General.UnknownError",
              "stackTrace": "org.neo4j.cypher.internal.frontend.v3_1.ArithmeticException\n\tat org.neo4j.cypher.internal.compiler.v3_1.commands.expressions.Divide.apply(Divide.scala:36)\n\tat org.neo4j.cypher.internal.compiler.v3_1.pipes.ProjectionPipe$$anonfun$internalCreateResults$1$$anonfun$apply$1.apply(ProjectionPipe.scala:48)\n\tat org.neo4j.cypher.internal.compiler.v3_1.pipes.ProjectionPipe$$anonfun$internalCreateResults$1$$anonfun$apply$1.apply(ProjectionPipe.scala:46)\n\tat scala.collection.immutable.Map$Map1.foreach(Map.scala:116)\n\tat org.neo4j.cypher.internal.compiler.v3_1.pipes.ProjectionPipe$$anonfun$internalCreateResults$1.apply(ProjectionPipe.scala:46)\n\tat org.neo4j.cypher.internal.compiler.v3_1.pipes.ProjectionPipe$$anonfun$internalCreateResults$1.apply(ProjectionPipe.scala:45)\n\tat scala.collection.Iterator$$anon$11.next(Iterator.scala:409)\n\tat scala.collection.Iterator$$anon$11.next(Iterator.scala:409)\n\tat org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator$$anonfun$next$1.apply(ResultIterator.scala:70)\n\tat org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator$$anonfun$next$1.apply(ResultIterator.scala:67)\n\tat org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator$$anonfun$failIfThrows$1.apply(ResultIterator.scala:93)\n\tat org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator.decoratedCypherException(ResultIterator.scala:102)\n\tat org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator.failIfThrows(ResultIterator.scala:91)\n\tat org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator.next(ResultIterator.scala:67)\n\tat org.neo4j.cypher.internal.compiler.v3_1.ClosingIterator.next(ResultIterator.scala:48)\n\tat org.neo4j.cypher.internal.compiler.v3_1.PipeExecutionResult.next(PipeExecutionResult.scala:79)\n\tat org.neo4j.cypher.internal.compiler.v3_1.PipeExecutionResult$$anon$2.next(PipeExecutionResult.scala:69)\n\tat org.neo4j.cypher.internal.compiler.v3_1.PipeExecutionResult$$anon$2.next(PipeExecutionResult.scala:66)\n\tat org.neo4j.cypher.internal.compatibility.ExecutionResultWrapperFor3_1$$anon$1$$anonfun$next$1.apply(CompatibilityFor3_1.scala:265)\n\tat org.neo4j.cypher.internal.compatibility.ExecutionResultWrapperFor3_1$$anon$1$$anonfun$next$1.apply(CompatibilityFor3_1.scala:265)\n\tat org.neo4j.cypher.internal.compatibility.exceptionHandlerFor3_1$.runSafely(CompatibilityFor3_1.scala:141)\n\tat org.neo4j.cypher.internal.compatibility.ExecutionResultWrapperFor3_1$$anon$1.next(CompatibilityFor3_1.scala:264)\n\tat org.neo4j.cypher.internal.compatibility.ExecutionResultWrapperFor3_1$$anon$1.next(CompatibilityFor3_1.scala:258)\n\tat org.neo4j.cypher.internal.javacompat.ExecutionResult.next(ExecutionResult.java:241)\n\tat org.neo4j.cypher.internal.javacompat.ExecutionResult.next(ExecutionResult.java:54)\n\tat org.neo4j.helpers.collection.ExceptionHandlingIterable$1.next(ExceptionHandlingIterable.java:53)\n\tat org.neo4j.helpers.collection.IteratorWrapper.next(IteratorWrapper.java:47)\n\tat org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:64)\n\tat org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:75)\n\tat org.neo4j.server.rest.repr.MappingSerializer.putList(MappingSerializer.java:61)\n\tat org.neo4j.server.rest.repr.CypherResultRepresentation.serialize(CypherResultRepresentation.java:58)\n\tat org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:41)\n\tat org.neo4j.server.rest.repr.OutputFormat.assemble(OutputFormat.java:235)\n\tat org.neo4j.server.rest.repr.OutputFormat.formatRepresentation(OutputFormat.java:175)\n\tat org.neo4j.server.rest.repr.OutputFormat.response(OutputFormat.java:158)\n\tat org.neo4j.server.rest.repr.OutputFormat.ok(OutputFormat.java:71)\n\tat org.neo4j.server.rest.web.CypherService.cypher(CypherService.java:138)\n\tat sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:497)\n\tat com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)\n\tat com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)\n\tat com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)\n\tat org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:145)\n\tat com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)\n\tat com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)\n\tat com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)\n\tat com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)\n\tat com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)\n\tat com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)\n\tat com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)\n\tat com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)\n\tat com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)\n\tat com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)\n\tat com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)\n\tat org.neo4j.server.rest.dbms.AuthorizationDisabledFilter.doFilter(AuthorizationDisabledFilter.java:48)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\n\tat org.neo4j.server.rest.web.CollectUserAgentFilter.doFilter(CollectUserAgentFilter.java:69)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:497)\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\n\tat org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\n\tat java.lang.Thread.run(Thread.java:745)\n"
            }
          ]
        },
        "fullname": "org.neo4j.cypher.ArithmeticException",
        "stackTrace": [
          "org.neo4j.cypher.internal.compatibility.exceptionHandlerFor3_1$.arithmeticException(CompatibilityFor3_1.scala:88)",
          "org.neo4j.cypher.internal.compatibility.exceptionHandlerFor3_1$.arithmeticException(CompatibilityFor3_1.scala:85)",
          "org.neo4j.cypher.internal.frontend.v3_1.ArithmeticException.mapToPublic(CypherException.scala:98)",
          "org.neo4j.cypher.internal.compatibility.exceptionHandlerFor3_1$.runSafely(CompatibilityFor3_1.scala:146)",
          "org.neo4j.cypher.internal.compatibility.ExecutionResultWrapperFor3_1$$anon$1.next(CompatibilityFor3_1.scala:264)",
          "org.neo4j.cypher.internal.compatibility.ExecutionResultWrapperFor3_1$$anon$1.next(CompatibilityFor3_1.scala:258)",
          "org.neo4j.cypher.internal.javacompat.ExecutionResult.next(ExecutionResult.java:241)",
          "org.neo4j.cypher.internal.javacompat.ExecutionResult.next(ExecutionResult.java:54)",
          "org.neo4j.helpers.collection.ExceptionHandlingIterable$1.next(ExceptionHandlingIterable.java:53)",
          "org.neo4j.helpers.collection.IteratorWrapper.next(IteratorWrapper.java:47)",
          "org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:64)",
          "org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:75)",
          "org.neo4j.server.rest.repr.MappingSerializer.putList(MappingSerializer.java:61)",
          "org.neo4j.server.rest.repr.CypherResultRepresentation.serialize(CypherResultRepresentation.java:58)",
          "org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:41)",
          "org.neo4j.server.rest.repr.OutputFormat.assemble(OutputFormat.java:235)",
          "org.neo4j.server.rest.repr.OutputFormat.formatRepresentation(OutputFormat.java:175)",
          "org.neo4j.server.rest.repr.OutputFormat.response(OutputFormat.java:158)",
          "org.neo4j.server.rest.repr.OutputFormat.ok(OutputFormat.java:71)",
          "org.neo4j.server.rest.web.CypherService.cypher(CypherService.java:138)",
          "java.lang.reflect.Method.invoke(Method.java:497)",
          "org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:145)",
          "org.neo4j.server.rest.dbms.AuthorizationDisabledFilter.doFilter(AuthorizationDisabledFilter.java:48)",
          "org.neo4j.server.rest.web.CollectUserAgentFilter.doFilter(CollectUserAgentFilter.java:69)",
          "java.lang.Thread.run(Thread.java:745)"
        ],
        "message": "/ by zero",
        "errors": [
          {
            "code": "Neo.ClientError.Statement.ArithmeticError",
            "message": "/ by zero"
          }
        ]
      },
      "fullname": "org.neo4j.kernel.impl.query.QueryExecutionKernelException",
      "stackTrace": [
        "org.neo4j.cypher.internal.javacompat.ExecutionResult.converted(ExecutionResult.java:399)",
        "org.neo4j.cypher.internal.javacompat.ExecutionResult.next(ExecutionResult.java:245)",
        "org.neo4j.cypher.internal.javacompat.ExecutionResult.next(ExecutionResult.java:54)",
        "org.neo4j.helpers.collection.ExceptionHandlingIterable$1.next(ExceptionHandlingIterable.java:53)",
        "org.neo4j.helpers.collection.IteratorWrapper.next(IteratorWrapper.java:47)",
        "org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:64)",
        "org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:75)",
        "org.neo4j.server.rest.repr.MappingSerializer.putList(MappingSerializer.java:61)",
        "org.neo4j.server.rest.repr.CypherResultRepresentation.serialize(CypherResultRepresentation.java:58)",
        "org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:41)",
        "org.neo4j.server.rest.repr.OutputFormat.assemble(OutputFormat.java:235)",
        "org.neo4j.server.rest.repr.OutputFormat.formatRepresentation(OutputFormat.java:175)",
        "org.neo4j.server.rest.repr.OutputFormat.response(OutputFormat.java:158)",
        "org.neo4j.server.rest.repr.OutputFormat.ok(OutputFormat.java:71)",
        "org.neo4j.server.rest.web.CypherService.cypher(CypherService.java:138)",
        "java.lang.reflect.Method.invoke(Method.java:497)",
        "org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:145)",
        "org.neo4j.server.rest.dbms.AuthorizationDisabledFilter.doFilter(AuthorizationDisabledFilter.java:48)",
        "org.neo4j.server.rest.web.CollectUserAgentFilter.doFilter(CollectUserAgentFilter.java:69)",
        "java.lang.Thread.run(Thread.java:745)"
      ],
      "message": "/ by zero",
      "errors": [
        {
          "code": "Neo.ClientError.Statement.ArithmeticError",
          "message": "/ by zero"
        }
      ]
    },
    "fullname": "org.neo4j.graphdb.QueryExecutionException",
    "stackTrace": [
      "org.neo4j.kernel.impl.query.QueryExecutionKernelException.asUserException(QueryExecutionKernelException.java:35)",
      "org.neo4j.cypher.internal.javacompat.ExecutionResult.converted(ExecutionResult.java:399)",
      "org.neo4j.cypher.internal.javacompat.ExecutionResult.next(ExecutionResult.java:245)",
      "org.neo4j.cypher.internal.javacompat.ExecutionResult.next(ExecutionResult.java:54)",
      "org.neo4j.helpers.collection.ExceptionHandlingIterable$1.next(ExceptionHandlingIterable.java:53)",
      "org.neo4j.helpers.collection.IteratorWrapper.next(IteratorWrapper.java:47)",
      "org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:64)",
      "org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:75)",
      "org.neo4j.server.rest.repr.MappingSerializer.putList(MappingSerializer.java:61)",
      "org.neo4j.server.rest.repr.CypherResultRepresentation.serialize(CypherResultRepresentation.java:58)",
      "org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:41)",
      "org.neo4j.server.rest.repr.OutputFormat.assemble(OutputFormat.java:235)",
      "org.neo4j.server.rest.repr.OutputFormat.formatRepresentation(OutputFormat.java:175)",
      "org.neo4j.server.rest.repr.OutputFormat.response(OutputFormat.java:158)",
      "org.neo4j.server.rest.repr.OutputFormat.ok(OutputFormat.java:71)",
      "org.neo4j.server.rest.web.CypherService.cypher(CypherService.java:138)",
      "java.lang.reflect.Method.invoke(Method.java:497)",
      "org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:145)",
      "org.neo4j.server.rest.dbms.AuthorizationDisabledFilter.doFilter(AuthorizationDisabledFilter.java:48)",
      "org.neo4j.server.rest.web.CollectUserAgentFilter.doFilter(CollectUserAgentFilter.java:69)",
      "java.lang.Thread.run(Thread.java:745)"
    ],
    "message": "/ by zero",
    "errors": [
      {
        "code": "Neo.ClientError.Statement.ArithmeticError",
        "message": "/ by zero"
      }
    ]
  },
  "errors": [
    {
      "code": "Neo.ClientError.Request.InvalidFormat",
      "message": "/ by zero"
    }
  ]
}