1
0
Fork 0
arangodb/Documentation/Examples/RestTransactionSingle.gener...

18 lines
391 B
Plaintext

shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF
{
"collections" : {
"write" : "products"
},
"action" : "function () { var db = require('internal').db; db.products.save({}); return db.products.count(); }"
}
EOF
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"result" : 1,
"error" : false,
"code" : 200
}