Available on Github:

You can add PrivataAudit to your app using npm:

npm install privata-js-sdk

Once you have added the dependency, you need to instantiate the PrivataAudit to the relevant part of your code:

// add Audit
var privataAudit = new PrivataAudit();

PrivataAudit can be instantiate with two optional arguments, you can specify sandbox option and/or an apiUrl .

Once you have an instance of the PrivataAudit, you need to initialize it with your credentials:

await privataAudit.initialize(dbKey, dbSecret);

After initialization, you can start to send information to API. When a user accesses data on your application from your database, you can send it to API:

await privataAudit.sendQueries(queries)

Details on the structure of the queries payload can be found here: