Skip navigation links

Cumulocity SDK - Java Client API

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

See: Description

Packages 
Package Description
com.cumulocity.rest.representation  
com.cumulocity.rest.representation.alarm  
com.cumulocity.rest.representation.annotation  
com.cumulocity.rest.representation.application  
com.cumulocity.rest.representation.application.microservice  
com.cumulocity.rest.representation.application.smart  
com.cumulocity.rest.representation.audit  
com.cumulocity.rest.representation.binary  
com.cumulocity.rest.representation.cep  
com.cumulocity.rest.representation.connector  
com.cumulocity.rest.representation.devicebootstrap  
com.cumulocity.rest.representation.email  
com.cumulocity.rest.representation.eraser  
com.cumulocity.rest.representation.event  
com.cumulocity.rest.representation.export  
com.cumulocity.rest.representation.identity  
com.cumulocity.rest.representation.inventory  
com.cumulocity.rest.representation.jsonpredicate  
com.cumulocity.rest.representation.loginoption  
com.cumulocity.rest.representation.measurement  
com.cumulocity.rest.representation.microservice  
com.cumulocity.rest.representation.operation  
com.cumulocity.rest.representation.operation.bulk  
com.cumulocity.rest.representation.operation.operations  
com.cumulocity.rest.representation.platform  
com.cumulocity.rest.representation.retention  
com.cumulocity.rest.representation.role.inventory  
com.cumulocity.rest.representation.tenant  
com.cumulocity.rest.representation.tenant.auth  
com.cumulocity.rest.representation.user  
com.cumulocity.rest.representation.validation  
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  
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.measurement.autopoll  
com.cumulocity.sdk.client.notification  
com.cumulocity.sdk.client.option  
com.cumulocity.sdk.client.polling  
com.cumulocity.sdk.client.rest.mediatypes  
com.cumulocity.sdk.client.rest.providers  
com.cumulocity.sdk.client.user  
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
Skip navigation links

Copyright © 2020 (C) Cumulocity GmbH. All rights reserved.