IBM Watson IoT Platform SDK Swagger Client

IBM Watson IoT Platform HTTP API client to simplify application development

License

License

Categories

Categories

Swagger Program Interface REST Frameworks
GroupId

GroupId

com.ibm.wiotp
ArtifactId

ArtifactId

com.ibm.wiotp.sdk.swagger
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

IBM Watson IoT Platform SDK Swagger Client
IBM Watson IoT Platform HTTP API client to simplify application development
Project URL

Project URL

https://github.com/ibm-watson-iot/swagger-java
Source Code Management

Source Code Management

https://github.com/ibm-watson-iot/swagger-java

Download com.ibm.wiotp.sdk.swagger

How to add to project

<!-- https://jarcasting.com/artifacts/com.ibm.wiotp/com.ibm.wiotp.sdk.swagger/ -->
<dependency>
    <groupId>com.ibm.wiotp</groupId>
    <artifactId>com.ibm.wiotp.sdk.swagger</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.ibm.wiotp/com.ibm.wiotp.sdk.swagger/
implementation 'com.ibm.wiotp:com.ibm.wiotp.sdk.swagger:0.1.0'
// https://jarcasting.com/artifacts/com.ibm.wiotp/com.ibm.wiotp.sdk.swagger/
implementation ("com.ibm.wiotp:com.ibm.wiotp.sdk.swagger:0.1.0")
'com.ibm.wiotp:com.ibm.wiotp.sdk.swagger:jar:0.1.0'
<dependency org="com.ibm.wiotp" name="com.ibm.wiotp.sdk.swagger" rev="0.1.0">
  <artifact name="com.ibm.wiotp.sdk.swagger" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.ibm.wiotp', module='com.ibm.wiotp.sdk.swagger', version='0.1.0')
)
libraryDependencies += "com.ibm.wiotp" % "com.ibm.wiotp.sdk.swagger" % "0.1.0"
[com.ibm.wiotp/com.ibm.wiotp.sdk.swagger "0.1.0"]

Dependencies

compile (6)

Group / Artifact Type Version
io.swagger : swagger-annotations jar 1.5.18
com.squareup.okhttp : okhttp jar 2.7.5
com.squareup.okhttp : logging-interceptor jar 2.7.5
com.google.code.gson : gson jar 2.8.1
io.gsonfire : gson-fire jar 1.8.0
org.threeten : threetenbp jar 1.3.5

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

com.ibm.wiotp.sdk.swagger

IBM Watson IoT Platform Organization Administration REST APIs

  • API version: 0002
    • Build date: 2019-04-30T18:06:21.121+01:00

The Organization Adminstration APIs can be used to configure an organization (including creating and deleting devices), checking usage, service status and diagnosing device connection problems. For information on this API, and how to use Watson IoT Platform APIs generally see the API documentation.

Automatically generated by the Swagger Codegen

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.ibm.wiotp.sdk</groupId>
  <artifactId>com.ibm.wiotp.sdk.swagger</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.ibm.wiotp.sdk:com.ibm.wiotp.sdk.swagger:1.0.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/com.ibm.wiotp.sdk.swagger-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import com.ibm.wiotp.swagger.*;
import com.ibm.wiotp.swagger.auth.*;
import com.ibm.wiotp.swagger.model.*;
import com.ibm.wiotp.swagger.api.DeviceBulkConfigurationApi;

import java.io.File;
import java.util.*;

public class DeviceBulkConfigurationApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: ApiKey
        HttpBasicAuth ApiKey = (HttpBasicAuth) defaultClient.getAuthentication("ApiKey");
        ApiKey.setUsername("YOUR USERNAME");
        ApiKey.setPassword("YOUR PASSWORD");

        DeviceBulkConfigurationApi apiInstance = new DeviceBulkConfigurationApi();
        DeviceBulkRegistrationRequestList devices = new DeviceBulkRegistrationRequestList(); // DeviceBulkRegistrationRequestList | Devices to be registered
        try {
            DeviceWithPasswordList result = apiInstance.bulkDevicesAddPost(devices);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeviceBulkConfigurationApi#bulkDevicesAddPost");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://localhost/api/v0002

Class Method HTTP request Description
DeviceBulkConfigurationApi bulkDevicesAddPost POST /bulk/devices/add Register multiple new devices
DeviceBulkConfigurationApi bulkDevicesGet GET /bulk/devices List devices
DeviceBulkConfigurationApi bulkDevicesRemovePost POST /bulk/devices/remove Delete multiple devices
DeviceConfigurationApi deviceTypesTypeIdDevicesDeviceIdDelete DELETE /device/types/{typeId}/devices/{deviceId} Remove device
DeviceConfigurationApi deviceTypesTypeIdDevicesDeviceIdDevicesGet GET /device/types/{typeId}/devices/{deviceId}/devices Get devices that are connected through the gateway specified by id {deviceId}
DeviceConfigurationApi deviceTypesTypeIdDevicesDeviceIdEdgestatusGet GET /device/types/{typeId}/devices/{deviceId}/edgestatus Return the status of containers from an edge node.
DeviceConfigurationApi deviceTypesTypeIdDevicesDeviceIdEdgestatusServiceIdGet GET /device/types/{typeId}/devices/{deviceId}/edgestatus/{serviceId} Return the status of containers from an edge node filtering by service.
DeviceConfigurationApi deviceTypesTypeIdDevicesDeviceIdGet GET /device/types/{typeId}/devices/{deviceId} Get device
DeviceConfigurationApi deviceTypesTypeIdDevicesDeviceIdPut PUT /device/types/{typeId}/devices/{deviceId} Update device
DeviceConfigurationApi deviceTypesTypeIdDevicesGet GET /device/types/{typeId}/devices List devices
DeviceConfigurationApi deviceTypesTypeIdDevicesPost POST /device/types/{typeId}/devices Add device
DeviceProblemDeterminationApi logsConnectionGet GET /logs/connection List device connection log events
DeviceTypeConfigurationApi deviceTypesGet GET /device/types List device types
DeviceTypeConfigurationApi deviceTypesPost POST /device/types Create device type
DeviceTypeConfigurationApi deviceTypesTypeIdDelete DELETE /device/types/{typeId} Delete device type
DeviceTypeConfigurationApi deviceTypesTypeIdGet GET /device/types/{typeId} Get device type
DeviceTypeConfigurationApi deviceTypesTypeIdPut PUT /device/types/{typeId} Update device type
OrganizationConfigurationApi rootGet GET / Get organization details
ServiceStatusApi serviceStatusGet GET /service-status Retrieve the status of services for an organization
UsageManagementApi usageDataTrafficGet GET /usage/data-traffic Retrieve the amount of data used

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

ApiKey

  • Type: HTTP basic authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

com.ibm.wiotp

IBM Watson IoT

Code repositories built around the IBM Watson IoT Platform

Versions

Version
0.1.0