Java development SDK
Version 0.0.0-v5-development.2 · 229,190 bytes
Download Java SDKSHA-25640b15cedce3d09c81d5930aff4fcbb5cb8d182e6854a7f658b29dc75276c5b7c
Runtime requirements
Java 25 or newer; preview built and tested on Temurin 25.0.2+10 LTS.
Maven 3.9 or newer. Install the accompanying POM so Jackson Databind 2.20.2 and its transitive dependencies are resolved.
An approved organization grant and issued client credentials for platform.capabilities:read.
Native API base URL https://www.pradiota.com/sandbox/v1. These packages preserve the configured API path. Use approved sandbox credentials.
Install locally
curl --fail --location --output mighty-developers-staging-0.0.0-v5-development.2.jar https://www.pradiota.com/assets/developer-sdks/preview-20261007-sandbox-path/mighty-developers-staging-0.0.0-v5-development.2.jar
curl --fail --location --output mighty-developers-staging-0.0.0-v5-development.2.pom https://www.pradiota.com/assets/developer-sdks/preview-20261007-sandbox-path/mighty-developers-staging-0.0.0-v5-development.2.pom
mvn install:install-file -Dfile=mighty-developers-staging-0.0.0-v5-development.2.jar -DpomFile=mighty-developers-staging-0.0.0-v5-development.2.pom
# In your application's pom.xml, use Java 25 and this dependency.
# Maven resolves Jackson Databind 2.20.2 from the installed SDK POM.
<properties>
<maven.compiler.release>25</maven.compiler.release>
</properties>
<dependencies>
<dependency>
<groupId>com.pradiota</groupId>
<artifactId>mighty-developers-staging</artifactId>
<version>0.0.0-v5-development.2</version>
</dependency>
</dependencies>Make your first request
Create client credentials after your application is approved and its sandbox license is active. Set MIGHTY_CLIENT_ID and MIGHTY_CLIENT_SECRET in your server environment. The example exchanges them for a platform.capabilities:read token, then calls GET /v1/capabilities. Java and TypeScript use platformCapabilitiesGet; Python uses platform_capabilities_get. Save the example in the file named in the install instructions, then run it locally. Check the HTTP status, request ID and response body.
First request — approved application required
import com.pradiota.developers.Client;
import com.pradiota.developers.Transport.RequestOptions;
import java.util.Map;
public class Example {
static String required(String name) {
String value = System.getenv(name);
if (value == null || value.isBlank()) throw new IllegalStateException("Set " + name);
return value;
}
public static void main(String[] args) throws Exception {
var client = new Client("https://www.pradiota.com/sandbox/v1");
var auth = client.clientCredentials(required("MIGHTY_CLIENT_ID"),
required("MIGHTY_CLIENT_SECRET"), "platform.capabilities:read");
if (auth.status() != 200 || !(auth.body() instanceof Map<?, ?> body)
|| !(body.get("access_token") instanceof String token) || token.isBlank()) {
throw new IllegalStateException("Credential exchange failed: HTTP " + auth.status());
}
var response = client.platformCapabilitiesGet(token, RequestOptions.empty());
System.out.println(response.status());
System.out.println(response.requestId());
System.out.println(response.body());
}
}In your Maven project, add the SDK dependency above to pom.xml. Save the example as Example.java next to that file. With Java 25 and your credential environment variables set, run these commands in Bash:
mvn dependency:build-classpath -Dmdep.outputFile=classpath.txt
java --class-path "$(cat classpath.txt)" Example.java