Table of Contents
- 20.1. Transactional Cypher HTTP endpoint
- Begin and commit a transaction in one request
- Execute multiple statements
- Begin a transaction
- Execute statements in an open transaction
- Execute statements in an open transaction in REST format for the return
- Reset transaction timeout of an open transaction
- Commit an open transaction
- Rollback an open transaction
- Include query statistics
- Return results in graph format
- Handling errors
- Handling errors in an open transaction
- 20.2. Neo4j Status Codes
- 20.3. REST API Authentication and Authorization
- 20.4. Service root
- 20.5. Streaming
- 20.6. Legacy Cypher HTTP endpoint
- 20.7. Property values
- 20.8. Nodes
- 20.9. Relationships
- Get Relationship by ID
- Create relationship
- Create a relationship with properties
- Delete relationship
- Get all properties on a relationship
- Set all properties on a relationship
- Get single property on a relationship
- Set single property on a relationship
- Get all relationships
- Get incoming relationships
- Get outgoing relationships
- Get typed relationships
- Get relationships on a node without relationships
- 20.10. Relationship types
- 20.11. Node properties
- 20.12. Relationship properties
- 20.13. Node labels
- 20.14. Node degree
- 20.15. Indexing
- 20.16. Constraints
- Create uniqueness constraint
- Get a specific uniqueness constraint
- Get all uniqueness constraints for a label
- Drop uniqueness constraint
- Get a specific node property existence constraint
- Get all node property existence constraints for a label
- Get all constraints for a label
- Get a specific relationship property existence constraint
- Get all relationship property existence constraints for a type
- Get all constraints
- 20.17. Traversals
- 20.18. Graph Algorithms
- 20.19. Batch operations
- 20.20. Legacy indexing
- Create node index
- Create node index with configuration
- Delete node index
- List node indexes
- Add node to index
- Remove all entries with a given node from an index
- Remove all entries with a given node and key from an index
- Remove all entries with a given node, key and value from an index
- Find node by exact match
- Find node by query
- 20.21. Unique Indexing
- Get or create unique node (create)
- Get or create unique node (existing)
- Create a unique node or return fail (create)
- Create a unique node or return fail (fail)
- Add an existing node to unique index (not indexed)
- Add an existing node to unique index (already indexed)
- Get or create unique relationship (create)
- Get or create unique relationship (existing)
- Create a unique relationship or return fail (create)
- Create a unique relationship or return fail (fail)
- Add an existing relationship to a unique index (not indexed)
- Add an existing relationship to a unique index (already indexed)
- 20.22. WADL Support
- 20.23. Using the REST API from WebLogic
The Neo4j REST API is designed with discoverability in mind, so that you can start with a GET
on the Section 20.4, “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 7, Languages.
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 20.5, “Streaming” for more information.