cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to use HTTP API to create a relation between two nodes?

Taking reference of https://neo4j.com/docs/http-api/current/actions/query-format/ but it looks incomplete.

I have statement like following and trying to figure out the right way to pass parameters

 

{
  "statements": [
    {
      "statement": "MATCH (a),(b) WHERE a.resource_id = $srid AND b.resource_id = $drid AND b.tenant_id = $tid CREATE (a) --[r:$relation]--> (b) RETURN type(r)",
      "parameters": {
        "props": {
          "name": "My Node"  //I don't know, if I need to pass srid, drid, tid here or from outside to replace those fields and mark parameters as empty.
        }
      }
    },

Could you please help?
Also let me know if http api is something we can rely on for all kind of queries or we should switch to CQL mode of querying.

0 REPLIES 0