HTTP REST requests
Neo4j Browser supports the following HTTP REST commands:
-
:delete— HTTP DELETE. -
:get— HTTP GET. -
:head— HTTP HEAD. -
:post— HTTP POST. -
:put— HTTP PUT.
It is possible to use these commands to query the Neo4j HTTP API.
|
The Neo4j REST API was deprecated in Neo4j 3.5 and was removed from Neo4j 4.X versions. |
Example 1. HTTP API
:get /
{
"bolt_routing" : "neo4j://localhost:7687",
"transaction" : "http://localhost:7474/db/{databaseName}/tx",
"bolt_direct" : "bolt://localhost:7687",
"neo4j_version" : "5.25.0",
"neo4j_edition" : "enterprise"
}
Example 2. HTTP API — transaction
:post /db/neo4j/tx
{"results":[],"errors":[],"commit":"http://localhost:7474/db/neo4j/tx/2/commit","transaction":{"expires":"Fri, 20 Jan 2222 10:11:12 GMT"}}
Example 3. HTTP API — transaction and commit
:post /db/neo4j/tx/commit {
"statements": [
{
"statement": "CREATE (n $props) RETURN n",
"parameters": {
"props": {
"name": "My Node"
}
}
},
{
"statement": "CREATE (n $props) RETURN n",
"parameters": {
"props": {
"name": "Another Node"
}
}
}]
}