Database Reference
In-Depth Information
"method": "GET",
"to":"/node/25/properties",
"id" :1
},
{
"method":"POST",
"to": "/node",
"body" :{
"Name" : "Robert De Niro",
"Age" : "71"
},
"id": 2
}]
Let's discuss the role of each of the different sections of the preceding JSON request:
method : This defines the type of operation (GET, PUT, POST, DELETE, and so
on).
to : This is the target URL where we submit our request. The URL can request
any type of operation on nodes, attributes, or relationships. For example, in Job-0
("id:"0") we request the PUT operation on node with node ID = 25, for Job-1
GET operation on node with node ID = 25 and for Job-2 we use the POST opera-
tion for adding a new node. Node ID is unique and has internal IDs used by
Neo4j; they are not guaranteed to be the same for two different setups. So, before
executing the preceding example, find the node ID of the node, which contains
the Name property as Sylvester Stallone and then replace it in the pre-
ceding request. Node ID can be queried by executing the following Cypher query
on Neo4j shell:
match (n) where n.Name = "Sylvester Stallone" return
n;
body : This is the optional attribute for sending the parameters.
Id : This defines the unique ID of each job. Results, when returned, are identified
by the ID. The order of the results is the same as the order of the jobs when sub-
mitted.
Search WWH ::




Custom Search