-
-
Save coolteddy/810c1d29fad26d9e87b8f0767eb28d27 to your computer and use it in GitHub Desktop.
Neo4j curl call example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
QUERY=query.json | |
time curl -i -XPOST \ | |
-o output.log \ | |
--data "@$QUERY" \ | |
-H "Accept: application/json" \ | |
-H "Content-Type: application/json" \ | |
http://127.0.0.1:7474/db/data/transaction/commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"statements": [ | |
{ | |
"statement": "MATCH (d:Decision) WHERE id(d) = {decisionId} MATCH (c:Criterion) WHERE id(c) = {criterionId} WITH d, c MATCH (d)<-[:VOTED_FOR]-(vg:VoteGroup)-[:VOTED_ON]->(c) RETURN vg", | |
"parameters": { | |
"decisionId": "1", | |
"criterionId": "1" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment