Chapter 17. REST API

Table of Contents

17.1. Service root
17.2. Streaming
17.3. Cypher queries
17.4. Property values
17.5. Nodes
17.6. Relationships
17.7. Relationship types
17.8. Node properties
17.9. Relationship properties
17.10. Node labels
17.11. Indexing
17.12. Traversals
17.13. Built-in Graph Algorithms
17.14. Batch operations
17.15. Legacy indexing
17.16. Unique Indexing
17.17. Legacy Automatic Indexes
17.18. Configurable Legacy Automatic Indexing
17.19. WADL Support

The Neo4j REST API is designed with discoverability in mind, so that you can start with a GET on the Section 17.1, “Service root” and from there discover URIs to perform other requests. The examples below uses URIs in the examples; they are subject to change in the future, so for future-proofness discover URIs where possible, instead of relying on the current layout. The default representation is json, both for responses and for data sent with POST/PUT requests.

Below follows a listing of ways to interact with the REST API. For language bindings to the REST API, see Chapter 5, Neo4j Remote Client Libraries.

To interact with the JSON interface you must explicitly set the request header Accept:application/json for those requests that responds with data. You should also set the header Content-Type:application/json if your request sends data, for example when you’re creating a relationship. The examples include the relevant request and response headers.

The server supports streaming results, with better performance and lower memory overhead. See Section 17.2, “Streaming” for more information.