How do I see if DELETE was successful om Neo4j via REST API ? Here is my query.
MATCH (from_user:User),(to_user:User)
WHERE from_user.id = '522fed61e4b0a1f88d599ae0' AND to_user.id = '52b9f410e4b03902bd21629e'
MATCH from_user-[r]->to_user
DELETE r
via REST I get following response regardless of whether anything was deleted or not.
{
"results": [
{
"columns": [],
"data": []
}
],
"errors": []
}
Add this to your POST body
For example,
to get data such as
}
back. This applies to the transactional cypher endpoint. If you're using the legacy cypher endpoint, see http://neo4j.com/docs/2.2.1/rest-api-cypher.html#rest-api-retrieve-query-metadata
Have you tried to set the database to retrieve the "graph" and also the removed item?
It will mark the node as "removed" on the metadata of the node.
You should add that information on the POST request on the following parameter resultDataContents.
The request JSON must contains this:
If you read the data using the "row" schema you can set the database to give the response of both, but you need to remember that this will increase the received data. In that case, that parameter should be like this one:
Example of query:
The possible result would be something like this: