A Java library to provide easy access to RIPS and all of its features.
The utils dependency is optional.
implementation("com.ripstech.api:connector:3.1.0")
implementation("com.ripstech.api:utils:3.1.0")<dependencies>
...
<dependency>
<groupId>com.ripstech.api</groupId>
<artifactId>connector</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>com.ripstech.api</groupId>
<artifactId>utils</artifactId>
<version>3.1.0</version>
</dependency>
...
</dependencies>./gradlew clean entity-gen:run api:publishToMavenLocal utils:publishToMavenLocalString baseUrl = "https://api-3.ripstech.com";
String email = "";
String password = "";
Api api = new Api.Builder(baseUrl)
.withOAuthv2(username, password)
.build();long appId = 0;
String scanName = "";
File zipFile = ...;
ScanHandler scanHandler = new ScanHandler(api, appId);
scanHandler.uploadFile(zipFile);
long scanId = scanHandler.startScan(scanName).getId();long appId = 0;
long scanId = 0;
List<Issue> issues = new IssueHandler(api, appId, scanId)
.setLogger(System.out::println)
.getAllIssues();String version = api.status().get().orThrow(ApiException::new).getVersion();val version = when(val result = api.status().get().result()) {
is Failure -> throw result.exception()
is Success -> result.value.getVersion()
}Optional<String> version = api.status().get().map(Status::getVersion);
api.status().get().ifOk(status -> System.out.println(status.getVersion()));