Cumulocity SDK - Java Client API

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

See:
          Description

Packages
com.cumulocity.model  
com.cumulocity.model.audit  
com.cumulocity.model.audit.annotation  
com.cumulocity.model.control  
com.cumulocity.model.energy.measurement  
com.cumulocity.model.energy.sensor  
com.cumulocity.model.environmental.measurement  
com.cumulocity.model.environmental.sensor  
com.cumulocity.model.event  
com.cumulocity.model.idtype  
com.cumulocity.model.location.measurement  
com.cumulocity.model.location.sensor  
com.cumulocity.model.measurement  
com.cumulocity.model.operation  
com.cumulocity.model.pagination  
com.cumulocity.model.util  
com.cumulocity.rest.representation  
com.cumulocity.rest.representation.alarm  
com.cumulocity.rest.representation.annotation  
com.cumulocity.rest.representation.application  
com.cumulocity.rest.representation.audit  
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.operation.operations  
com.cumulocity.rest.representation.platform  
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.devicecontrol  
com.cumulocity.sdk.client.devicecontrol.autopoll  
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.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.measurement.autopoll  

 

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:

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);
        

Since:
0.11


Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.