Cumulocity SDK Java Client library provides the classes necessary to interact with the Cumulocity REST API.

The Cumulocity SDK Java client library provides Java interfaces to the following:

  • Inventory
  • Identity
  • Measurement
  • Alarm
  • Audit Record
  • Event

Example Usage:

        
        // Create the platform instance providing the URL of the platform, the tenant id, the tenant user name and password.
        Platform platform = new PlatformImpl("http://domain.cumulocity.com/", "tenant", "username", "password"); 
        
        // Access individual API resource object
        MeasurementApi  measurement = platform.getMeasurementApi()();
        
        // Create necessary representation
        GId sourceId = new GId();
        sourceId.setValue("12345");
        
        MeasurementRepresentation representation = new MeasurementRepresentation();
        representation.setType("reading");
        representation.setTime(new Date());
        representation.setSource(sourceId);
        
        ExampleFragment fragment = new ExampleFragment();
        representation.set(fragment);

        // Call the method
        MeasurementRepresentation createdRepresentation = measurement.create(representation);
        
Packages 
Package Description
com.cumulocity.model  
com.cumulocity.model.audit  
com.cumulocity.model.authentication  
com.cumulocity.model.email  
com.cumulocity.model.event  
com.cumulocity.model.idtype  
com.cumulocity.model.io  
com.cumulocity.model.measurement  
com.cumulocity.model.operation  
com.cumulocity.model.option  
com.cumulocity.model.util  
com.cumulocity.rest.representation  
com.cumulocity.rest.representation.alarm  
com.cumulocity.rest.representation.application  
com.cumulocity.rest.representation.application.microservice  
com.cumulocity.rest.representation.audit  
com.cumulocity.rest.representation.connector  
com.cumulocity.rest.representation.devicebootstrap  
com.cumulocity.rest.representation.email  
com.cumulocity.rest.representation.event  
com.cumulocity.rest.representation.identity  
com.cumulocity.rest.representation.inventory  
com.cumulocity.rest.representation.measurement  
com.cumulocity.rest.representation.operation  
com.cumulocity.rest.representation.platform  
com.cumulocity.rest.representation.reliable.notification  
com.cumulocity.rest.representation.tenant  
com.cumulocity.rest.representation.user  
com.cumulocity.sdk.client  
com.cumulocity.sdk.client.alarm
Provides the classes necessary to create, update and query alarms.
com.cumulocity.sdk.client.audit
Provides the classes necessary to create, update and query audit records.
com.cumulocity.sdk.client.base  
com.cumulocity.sdk.client.buffering  
com.cumulocity.sdk.client.cep.notification  
com.cumulocity.sdk.client.devicecontrol  
com.cumulocity.sdk.client.devicecontrol.autopoll  
com.cumulocity.sdk.client.devicecontrol.notification  
com.cumulocity.sdk.client.event
Provides the classes necessary to create, delete, update and query events.
com.cumulocity.sdk.client.identity
Provides the classes necessary to bind, unbind and query external identifiers.
com.cumulocity.sdk.client.interceptor  
com.cumulocity.sdk.client.inventory
Provides the classes necessary to create, delete, update and query managed objects.
com.cumulocity.sdk.client.measurement
Provides the classes necessary to create, delete and query measurements.
com.cumulocity.sdk.client.messaging.notifications  
com.cumulocity.sdk.client.notification  
com.cumulocity.sdk.client.option  
com.cumulocity.sdk.client.polling  
com.cumulocity.sdk.client.rest  
com.cumulocity.sdk.client.rest.mediatypes  
com.cumulocity.sdk.client.rest.providers  
com.cumulocity.sdk.client.user  
com.cumulocity.sdk.client.util