Skip to content

Instantly share code, notes, and snippets.

@FylmTM
Last active March 31, 2024 14:21
Show Gist options
  • Save FylmTM/04dae8d5c5819ea22e7a to your computer and use it in GitHub Desktop.
Save FylmTM/04dae8d5c5819ea22e7a to your computer and use it in GitHub Desktop.
Neo4j curl call example
#!/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
{
"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