Chapter 26. REST API

Table of Contents

26.1. Transactional HTTP endpoint
26.2. Service root
26.3. Streaming
26.4. Cypher queries
26.5. Property values
26.6. Nodes
26.7. Relationships
26.8. Relationship types
26.9. Node properties
26.10. Relationship properties
26.11. Node labels
26.12. Indexing
26.13. Constraints
26.14. Traversals
26.15. Built-in Graph Algorithms
26.16. Batch operations
26.17. Legacy indexing
26.18. Unique Indexing
26.19. Legacy Automatic Indexes
26.20. Configurable Legacy Automatic Indexing
26.21. WADL Support

The Neo4j REST API is designed with discoverability in mind, so that you can start with a GET on the Section 26.2, “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 6, 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 26.3, “Streaming” for more information.