Java Bindings for the Neo4J Server REST API, providing an implementation of GraphDatabaseService
Clone or download
#58 Compare This branch is 161 commits ahead, 3 commits behind jexp:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.


This library is no longer maintained.

Wrapping an over-the-wire connection behind a GraphDatabaseService API was never a good idea as operations that are in-process calls in the embedded case are network requests here with all the latency and behavior implications.

The Java binding for the Neo4j Server REST API wraps the REST calls behind the well known GraphDatabaseService API.

Please note, that the performance semantics are not the same, as most of these operations will cause a network request to the server. Make sure to minimize the fine grained operations and rely more on cypher and traversals to get your data and on batching and cypher to update the graph.

You can also use the RestAPIFacade directly to interact with your Neo4j-Server, without the GraphDatabaseService Wrapper.

The behavior of "transactions" changed in 1.8, in 1.7 they were no-op, i.e. just ignored. So you could just leave them off to not confuse people.

In 1.8 it tries to collect all operations within a tx as a batch-operation which will then be executed on the server.

This has the implication that the results retrieved within that "tx" are not immediately available but only after you called tx.success and tx.finish

Currently supports:


Build it locally. Then use the maven / ivy dependency or copy the jar into your app.


GraphDatabaseService gds = new RestGraphDatabase("http://localhost:7474/db/data");
GraphDatabaseService gds = new RestGraphDatabase("http://localhost:7474/db/data",username,password);

// or using the RestAPI directly
RestAPI restAPI = new RestAPIFacade("http://localhost:7474/db/data",username,password);

// as a Spring Bean, e.g. in [Spring Data Neo4j](
<bean id="graphDbService" class="" destroy-method="shutdown">
    <constructor-arg index="0" value="http://localhost:7474/db/data" />

References / Community:

Configuration (System-Properties)

timeouts in seconds

  • (convert transaction scope into batch-rest-operations)
  • (set to true if verbose request/response logging should be enabled)