How can I insert a node using Java Code?

talk

#1

Hi All

I am looking to insert a node in the cayley by using my customized rest api with the below payload using the java code.

Eg :-
api : http://localhost:64210/GraphDB/rest/api/v1/addNode
payload : {
“name”: “Node1”
}

Please help me out how I can achieve this via java code.

Thanks in advance !!


#2

Hi @Chaitanya,

We do not expose API for creating detached nodes. But you can insert any quad to materialize the node. It can be a type quad, for example:

<node1> <type> <Node> .