silh / cot-java-rest-sdk

Cloud of Things Java Rest SDK (Cloud der Dinge Java Rest SDK)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cloud of Things Java Rest SDK

The Cloud of Things (German Cloud der Dinge) is a platform for the Internet of Things by T-Systems International GmbH. Inside this repository you will find a Java based SDK to interface with the Cloud of Things API.

Current version is: 2.0.0

Usage

Add this to your pom.xml to include the SDK in your Maven Repo

<dependency>
    <groupId>com.telekom.m2m.cot</groupId>
    <artifactId>java-rest-client</artifactId>
    <version>2.0.0</version>
</dependency>

Example of a basic connect to the platform:

CloudOfThingsPlatform cotPlatform = new CloudOfThingsPlatform("hostname", new CotCredentials("tenant", "username", "password"));
InventoryApi inventoryApi = cotPlatform.getInventoryApi();
inventoryApi.get("idOfManagedObject");

Developers can find further information and examples in the DEVELOPER.md file.

Java Doc

You can find the Java Doc of the latest release here: http://cloud-of-things.github.io/cot-java-rest-sdk/

Release Notes

Short information about what has changed between releases.

Release 2.0.0

  • Measurement real time notification functionality was moved from InventoryApi to MeasurementApi

  • Prevent injection in update method (Pull Request #90).

  • More robust deserialization catching IllegalArgumentException being thrown by Spring Boot Class Loader for properties like "A+:1" in ThreePhaseElectricityMeasurement (Pull Request #91).

  • Fix erroneously wrapped numeric values in deserialized ExtensibleObjects (Pull Request #92), e.g.: serialized Object: temperature=ExtensibleObject{anyObject={unit=°C, value=100.0}} will be deserialized into:

    OLD:
    "temperature":{
        "value":{
            "value":"100.0"
        },
        "unit":"°C"
    }
    
    FIXED:
    "temperature":{
        "value":100.0,
        "unit":"°C"
    }
    
  • Includes Pull Request #94:

    • Usage of newest dependencies
    • Cleanup and improvements according to code inspection
  • EventApi provides the update of events as well now. (Pull Request #95)

  • Fixed cast in getSource() method of Alarm and Event

  • Added the getter as counterpart of set(Object) in ExtendedObject

  • Includes (Pull Request #96):

    • Fixed some unstable integration tests due to maybe changed behavior of the c8y API
    • Provided more details from the c8y error message in CotSdkException

Release 1.1.0

  • Includes Pull Request #73: Efficiently iterate over all objects in a collection via Java 8 Stream (accessible via stream()): pagination is automatically performed in the background
  • Resolve issue #72: Improved paging performance
  • Fix double slashes in url (Pull Request #77)

Release 1.0.5

  • Provide functionality to get all SmartREST Templates by X-ID
  • Resolve issue #52: provide http status code in thrown exception in getMeasurement()

Release 1.0.4

  • Improve usage of accept and content-type headers in rest client
  • Improve usage of OkHttpClient so that lesser resources will be used
  • Fix handling of binary data using byte array
  • Remove double slashes in rest api paths to avoid http code 404
  • Resolve issue #51: provide failure reason for failed operations
  • Resolve issue #53: provide a new method for creation NewDeviceRequests
  • Handle filters as enum and validate filters supported by cot
  • Improve Notification class which now provides realtime action

Release 1.0.2

  • Update of okhttp.
  • Better integration-tests.
  • Better login-process (include tenant in username).
  • NewDeviceRequestStatus-enum.
  • Refactoring.

Release 1.0.0

  • Improved Examples: Add examples for SDK-Users (see DEVELOPER.md)
  • Implemented Sensor Library
  • Implemented Binaries API
  • Final adjustments for MIT License
  • Improve ManagedObject-deserialization
  • Credentials for integration tests will be read from environment variables instead of property file
  • Refactor device permission handling
  • A lot of improvements and cleanups

Release 0.6.1

  • Provides and uses SmartRequest/-Response classes

Release 0.6.0

  • Complete Device control
  • Complete Real-time notifications
  • Complete Real-time statements
  • Complete Device management library
  • Complete Users API
  • Complete Retention Rule API
  • Complete SmartREST API
  • Complete Audit API
  • Refactor collection classes extending JsonArrayPagination base class

Release 0.5.0

  • Most important change is the removal of right now unused parameter tenant in CloudOfThingsPlatform constructor (See commit 62079fe).
  • Unsuccessful creation/store of objects in the CoT will now result in a CotSdkException.
  • New method DeviceCredentialsApi.NewDeviceRequest(..).
  • MeasurementsApi supports creating measurement collections.

Release 0.4.0

  • Improvements, e.g. connection exception handling
  • Short information about what has changed between releases.
  • Bulk Operations (beta)

Release 0.3.0

  • Complete Inventory
  • Get ManagedObjects in Collection
  • Complete Alarm API
  • Retrieve collections
  • Update Alarms
  • Complete Device Credentials API
  • Complete IdentityApi

Release 0.2.0

  • Complete Events
  • Complete Device registration process
  • Implement removal of devices and its belongings
  • Complete MeasurementsAPI
  • Refactor from single methods to Query objects.
  • Filter Date
  • Filter FragmentType
  • ... and combinations
  • DELETE - delete a measurement collection
  • Complete Inventory
  • DELETE a managed object reference

About

Cloud of Things Java Rest SDK (Cloud der Dinge Java Rest SDK)

License:MIT License


Languages

Language:Java 100.0%