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