3.4. Run queries inside a transaction

Once you have an open transaction by calling db/{name}/tx, you can run additional statements that form part of your transaction by calling the newly created transaction endpoint. The endpoint will be in the form db/{name}/tx/{txid}, where txid is provided in the response of the initial call to begin the transaction.

Example request

{
  "statements" : [ {
    "statement" : "CREATE (n) RETURN n"
  } ]
}

Example response

{
  "results" : [ {
    "columns" : [ "n" ],
    "data" : [ {
      "row" : [ { } ],
      "meta" : [ {
        "id" : 11,
        "type" : "node",
        "deleted" : false
      } ]
    } ]
  } ],
  "errors" : [ ],
  "commit" : "http://localhost:7474/db/neo4j/tx/16/commit",
  "transaction" : {
    "expires" : "Tue, 19 May 2020 19:54:29 GMT"
  }
}