You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Java client library for interacting with the DatabunkerPro API.
3
+
A Java client library for interacting with the DatabunkerPro API. DatabunkerPro is a secure, privacy-focused data vault that helps organizations manage and protect sensitive user data.
4
4
5
5
## Features
6
6
7
+
- Complete implementation of the DatabunkerPro API
7
8
- User management (create, get, update, delete)
8
-
- User request management
9
9
- App data management
10
10
- Legal basis and agreement management
11
-
- Processing activity management
12
11
- Connector management
13
12
- Group and role management
14
13
- Policy management
@@ -18,7 +17,6 @@ A Java client library for interacting with the DatabunkerPro API.
18
17
- Session management
19
18
- System configuration
20
19
- Bulk operations
21
-
- Easy to use Java API
22
20
- Thread-safe implementation
23
21
- Comprehensive test suite
24
22
@@ -33,7 +31,7 @@ Add the following dependency to your `pom.xml`:
33
31
34
32
```xml
35
33
<dependency>
36
-
<groupId>org.databunkerpro</groupId>
34
+
<groupId>org.databunker</groupId>
37
35
<artifactId>databunkerpro-java</artifactId>
38
36
<version>1.0.0-SNAPSHOT</version>
39
37
</dependency>
@@ -44,74 +42,67 @@ Add the following dependency to your `pom.xml`:
44
42
### Basic Setup
45
43
46
44
```java
47
-
importorg.databunkerpro.DatabunkerproApi;
48
-
importjava.util.Map;
49
-
importjava.util.HashMap;
50
-
51
-
publicclassExample {
52
-
publicstaticvoidmain(String[] args) {
53
-
String baseURL ="https://pro.databunker.org";
54
-
String xBunkerToken ="your-api-token";
55
-
String xBunkerTenant ="your-tenant-name";
56
-
57
-
try (DatabunkerproApi api =newDatabunkerproApi(baseURL, xBunkerToken, xBunkerTenant)) {
58
-
// Use the API here
59
-
} catch (Exception e) {
60
-
e.printStackTrace();
61
-
}
62
-
}
45
+
importorg.databunker.DatabunkerproApi;
46
+
47
+
// Initialize the API client
48
+
String apiUrl ="https://pro.databunker.org";
49
+
String apiToken ="your-api-token";
50
+
String tenantName ="your-tenant-name";
51
+
52
+
try (DatabunkerproApi api =newDatabunkerproApi(apiUrl, apiToken, tenantName)) {
53
+
// Use the API client
63
54
}
64
55
```
65
56
66
57
### User Management
67
58
68
-
#### Creating a User
69
-
70
59
```java
60
+
// Create a user
71
61
Map<String, Object> profile =newHashMap<>();
72
62
profile.put("email", "user@example.com");
73
63
profile.put("name", "John Doe");
74
64
profile.put("phone", "+1234567890");
75
65
76
-
Map<String, Object> options =newHashMap<>();
77
-
options.put("groupname", "users");
78
-
options.put("rolename", "member");
66
+
Map<String, Object> result = api.createUser(profile, null, null);
67
+
System.out.println("Created user with token: "+ result.get("token"));
79
68
80
-
Map<String, Object> result = api.createUser(profile, options, null);
81
-
```
69
+
// Get a user
70
+
Map<String, Object> user = api.getUser("email", "user@example.com", null);
0 commit comments