The java library for the iot-api. More info at
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Mar 2, 2015 Rename DatanodeWriteValue.timestampMiliseconds and DatanodeReadValue.… Sep 25, 2015
pom.xml Media type now specifies charset, binary conversion done with apache-… Mar 19, 2015


Getting started

Create your own account at

Register device

A device Id is automatically assigned to a newly registered device; the API Client should store this device Id as it uniquely identifies the device and will be used in subsequent calls. Client should avoid multiple registration call as this might result to duplicate devices being created. When in doubt, a good flow will be to get the list of already created devices and validate the device’s existence on the server through its name and attributes. Once the device is registered and the device id is obtained, clients can immediately start sending measurement values to the server.

    final String userName = "username";
    final String pwd = "password";
    final IOTAPIClient client = new IOTAPIClient("", userName, pwd);

    Device d = new Device();
    d.getAttributes().add(new DeviceAttribute("EngineSize", "2.4"));
    d.getAttributes().add(new DeviceAttribute("FuelType", "Benzene"));

    DeviceDetails deviceDetails = client.registerDevice(d);
    System.out.println("This is the device id that should be used in subsequent calls when sending measurement data: " + deviceDetails.getDeviceId());

Send measurement data

    Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));

    DatanodeWriteValue dnwrite = new DatanodeWriteValue();

    WriteDataResponse writeResult = client.writeData(deviceId, dnwrite);

Read measurement data

    DatanodeQueryCriteria crit = new DatanodeQueryCriteria(deviceId, "Engine/Primary/Airflow", "datapoint2", "datapoint3");

    ProcessValues processValues = client.readProcessData(crit);
    Collection datanodeReads = processValues.getDatanodeReads();
    for (DatanodeRead datanodeRead : datanodeReads) {

        for (DatanodeReadValue value : datanodeRead.getDatanodeReadValues()) {
            System.out.println("Value=" + value.getValue() + " @" +value.getTimestampMilliSeconds());


API documentation

Download JAR