Skip to content

Instantly share code, notes, and snippets.

@coolteddy
Forked from FylmTM/curl.sh
Created July 14, 2021 12:46
Show Gist options
  • Save coolteddy/810c1d29fad26d9e87b8f0767eb28d27 to your computer and use it in GitHub Desktop.
Save coolteddy/810c1d29fad26d9e87b8f0767eb28d27 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