Cumulocity SDK - Java Client API

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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Provides the classes necessary to create, update and query alarms.
Provides the classes necessary to create, update and query audit records.
 
 
 
 
 
 
Provides the classes necessary to create, delete, update and query events.
Provides the classes necessary to bind, unbind and query external identifiers.
 
Provides the classes necessary to create, delete, update and query managed objects.
Provides the classes necessary to create, delete and query measurements.