JavaScript

Available on Github: https://github.com/blockbirdLabs/privata-js-sdk

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 Privata.ai 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 Privata.ai API. When a user accesses data on your application from your database, you can send it to Privata.ai API:

await privataAudit.sendQueries(queries)

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