PHP

Available on Github: https://github.com/Privata-ai/privata-php-sdk

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 Privata.ai Audit
require __DIR__ . '/vendor/autoload.php';
// instantiate Privata.ai 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 Privata.ai API. When a user accesses data on your application from your database, you can send it to Privata.ai 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: