Java

Available on Github: https://github.com/blockbirdLabs/data-java-sdk

For Maven Projects, you can add the Privata.ai dependency

<dependencies>
...
<!-- Privata.ai data additions -->
<dependency>
<groupId>privata.ai</groupId>
<artifactId>data-privata-sdk</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
</dependencies>

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

import privata.ai.PrivataAudit;
// add Privata.ai Audit
PrivataAudit 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:

privataAudit.initialize(dbKey, sbSecret);

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:

privataAudit.sendQueries(queries)

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

If you use Hibernate as your ORM, you can follow our guide for implementing our SDK here: