1
0
Fork 0
arangodb/Documentation/Examples/RestIndexCreateNewUniqueCon...

29 lines
496 B
Plaintext

shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF
{
"type" : "hash",
"unique" : true,
"fields" : [
"a",
"b"
]
}
EOF
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
{
"id" : "products/825881483",
"type" : "hash",
"fields" : [
"a",
"b"
],
"selectivityEstimate" : 1,
"unique" : true,
"sparse" : false,
"isNewlyCreated" : true,
"error" : false,
"code" : 201
}