Available on Github:

You can add PrivataAudit to your app using composer:

composer require privata-js-sdk

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

// add Audit
require __DIR__ . '/vendor/autoload.php';
// instantiate Audit
$privataAudit = new PrivataAudit;

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

$resultAuthentication = $privataAudit -> initialize($dbKey, $dbSecret);

$resultAuthenticationwill either contain a message with 200 ( meaning successful authentication) or with an error message.

After initialization, you can start sending information to API. When a user accesses data on your application from your database, you can send it to API, where [$queries]is an array of jsons:

$resultQuery = $privataAudit -> submitQuery($queries);

Likewise, $resultQuery will either contain a message with 200 (meaning successful query submission) or with an error message.

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