Create a uniqueness constraint on a property.
Example request
POST http://localhost:7474/db/data/schema/constraint/person/uniqueness/
Accept: application/json; charset=UTF-8
Content-Type: application/json
{
"property_keys" : [ "name" ]
}Example response
200: OK
Content-Type: application/json; charset=UTF-8
{
"label" : "person",
"type" : "UNIQUENESS",
"property_keys" : [ "name" ]
}Get a specific uniqueness constraint for a label and a property.
Example request
GET http://localhost:7474/db/data/schema/constraint/user/uniqueness/name
Accept: application/json; charset=UTF-8
Example response
200: OK
Content-Type: application/json; charset=UTF-8
[ {
"property_keys" : [ "name" ],
"label" : "user",
"type" : "UNIQUENESS"
} ]Example request
GET http://localhost:7474/db/data/schema/constraint/user/uniqueness/
Accept: application/json; charset=UTF-8
Example response
200: OK
Content-Type: application/json; charset=UTF-8
[ {
"property_keys" : [ "name2" ],
"label" : "user",
"type" : "UNIQUENESS"
}, {
"property_keys" : [ "name1" ],
"label" : "user",
"type" : "UNIQUENESS"
} ]Example request
GET http://localhost:7474/db/data/schema/constraint/user
Accept: application/json; charset=UTF-8
Example response
200: OK
Content-Type: application/json; charset=UTF-8
[ {
"property_keys" : [ "name2" ],
"label" : "user",
"type" : "UNIQUENESS"
}, {
"property_keys" : [ "name1" ],
"label" : "user",
"type" : "UNIQUENESS"
} ]Example request
GET http://localhost:7474/db/data/schema/constraint/
Accept: application/json; charset=UTF-8
Example response
200: OK
Content-Type: application/json; charset=UTF-8
[ {
"property_keys" : [ "name2" ],
"label" : "prog",
"type" : "UNIQUENESS"
}, {
"property_keys" : [ "name1" ],
"label" : "user",
"type" : "UNIQUENESS"
} ]Copyright © 2013 Neo Technology