For more information, see Section 12.6, “Creating unique nodes”.
Example request
POST
http://localhost:7474/db/data/index/node/people?unique
Accept:
application/json
Content-Type:
application/json
{ "key" : "name", "value" : "Tobias", "properties" : { "name" : "Tobias", "sequence" : 1 } }
Example response
201:
Created
Content-Type:
application/json
Location:
http://localhost:7474/db/data/index/node/people/name/Tobias/15
{ "extensions" : { }, "paged_traverse" : "http://localhost:7474/db/data/node/15/paged/traverse/{returnType}{?pageSize,leaseTime}", "outgoing_relationships" : "http://localhost:7474/db/data/node/15/relationships/out", "traverse" : "http://localhost:7474/db/data/node/15/traverse/{returnType}", "all_typed_relationships" : "http://localhost:7474/db/data/node/15/relationships/all/{-list|&|types}", "property" : "http://localhost:7474/db/data/node/15/properties/{key}", "all_relationships" : "http://localhost:7474/db/data/node/15/relationships/all", "self" : "http://localhost:7474/db/data/node/15", "properties" : "http://localhost:7474/db/data/node/15/properties", "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/15/relationships/out/{-list|&|types}", "incoming_relationships" : "http://localhost:7474/db/data/node/15/relationships/in", "incoming_typed_relationships" : "http://localhost:7474/db/data/node/15/relationships/in/{-list|&|types}", "create_relationship" : "http://localhost:7474/db/data/node/15/relationships", "data" : { "sequence" : 1, "name" : "Tobias" }, "indexed" : "http://localhost:7474/db/data/index/node/people/name/Tobias/15" }
Example request
POST
http://localhost:7474/db/data/index/node/people?unique
Accept:
application/json
Content-Type:
application/json
{ "key" : "name", "value" : "Peter", "properties" : { "name" : "Peter", "sequence" : 2 } }
Example response
200:
OK
Content-Type:
application/json
{ "extensions" : { }, "paged_traverse" : "http://localhost:7474/db/data/node/16/paged/traverse/{returnType}{?pageSize,leaseTime}", "outgoing_relationships" : "http://localhost:7474/db/data/node/16/relationships/out", "traverse" : "http://localhost:7474/db/data/node/16/traverse/{returnType}", "all_typed_relationships" : "http://localhost:7474/db/data/node/16/relationships/all/{-list|&|types}", "property" : "http://localhost:7474/db/data/node/16/properties/{key}", "all_relationships" : "http://localhost:7474/db/data/node/16/relationships/all", "self" : "http://localhost:7474/db/data/node/16", "properties" : "http://localhost:7474/db/data/node/16/properties", "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/16/relationships/out/{-list|&|types}", "incoming_relationships" : "http://localhost:7474/db/data/node/16/relationships/in", "incoming_typed_relationships" : "http://localhost:7474/db/data/node/16/relationships/in/{-list|&|types}", "create_relationship" : "http://localhost:7474/db/data/node/16/relationships", "data" : { "sequence" : 1, "name" : "Peter" }, "indexed" : "http://localhost:7474/db/data/index/node/people/name/Peter/16" }
Example request
POST
http://localhost:7474/db/data/index/node/people?unique
Accept:
application/json
Content-Type:
application/json
{ "key" : "name", "value" : "Mattias", "uri" : "http://localhost:7474/db/data/node/17" }
Example response
201:
Created
Content-Type:
application/json
Location:
http://localhost:7474/db/data/index/node/people/name/Mattias/17
{ "extensions" : { }, "paged_traverse" : "http://localhost:7474/db/data/node/17/paged/traverse/{returnType}{?pageSize,leaseTime}", "outgoing_relationships" : "http://localhost:7474/db/data/node/17/relationships/out", "traverse" : "http://localhost:7474/db/data/node/17/traverse/{returnType}", "all_typed_relationships" : "http://localhost:7474/db/data/node/17/relationships/all/{-list|&|types}", "property" : "http://localhost:7474/db/data/node/17/properties/{key}", "all_relationships" : "http://localhost:7474/db/data/node/17/relationships/all", "self" : "http://localhost:7474/db/data/node/17", "properties" : "http://localhost:7474/db/data/node/17/properties", "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/17/relationships/out/{-list|&|types}", "incoming_relationships" : "http://localhost:7474/db/data/node/17/relationships/in", "incoming_typed_relationships" : "http://localhost:7474/db/data/node/17/relationships/in/{-list|&|types}", "create_relationship" : "http://localhost:7474/db/data/node/17/relationships", "data" : { }, "indexed" : "http://localhost:7474/db/data/index/node/people/name/Mattias/17" }
Example request
POST
http://localhost:7474/db/data/index/relationship/knowledge/?unique
Accept:
application/json
Content-Type:
application/json
{ "key" : "name", "value" : "Tobias", "start" : "http://localhost:7474/db/data/node/280", "end" : "http://localhost:7474/db/data/node/281", "type" : "knowledge" }
Example response
201:
Created
Content-Type:
application/json
Location:
http://localhost:7474/db/data/index/relationship/knowledge/name/Tobias/167
{ "extensions" : { }, "start" : "http://localhost:7474/db/data/node/280", "property" : "http://localhost:7474/db/data/relationship/167/properties/{key}", "self" : "http://localhost:7474/db/data/relationship/167", "properties" : "http://localhost:7474/db/data/relationship/167/properties", "type" : "knowledge", "end" : "http://localhost:7474/db/data/node/281", "data" : { "name" : "Tobias" }, "indexed" : "http://localhost:7474/db/data/index/relationship/knowledge/name/Tobias/167" }
Example request
POST
http://localhost:7474/db/data/index/relationship/knowledge/?unique
Accept:
application/json
Content-Type:
application/json
{ "key" : "name", "value" : "Mattias", "uri" : "http://localhost:7474/db/data/relationship/168" }
Example response
201:
Created
Content-Type:
application/json
Location:
http://localhost:7474/db/data/index/relationship/knowledge/name/Mattias/168
{ "extensions" : { }, "start" : "http://localhost:7474/db/data/node/282", "property" : "http://localhost:7474/db/data/relationship/168/properties/{key}", "self" : "http://localhost:7474/db/data/relationship/168", "properties" : "http://localhost:7474/db/data/relationship/168/properties", "type" : "knowledge", "end" : "http://localhost:7474/db/data/node/283", "data" : { }, "indexed" : "http://localhost:7474/db/data/index/relationship/knowledge/name/Mattias/168" }
Copyright © 2013 Neo Technology