Skip to content
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
gradle
src
.gitignore
.travis.yml
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
integration-tests.gradle
settings.gradle
version.properties

README.md

swagger-java-client


jSupla
IoT with Java and Supla

Requirements

Building the API client library requires Maven to be installed.

Installation

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

mvn install

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

mvn deploy

Refer to the official documentation for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
    <groupId>io.swagger</groupId>
    <artifactId>swagger-java-client</artifactId>
    <version>1.0.0</version>
    <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "io.swagger:swagger-java-client:1.0.0"

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/swagger-java-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

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

import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccessIdentifiersApi;

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

public class AccessIdentifiersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: password
        OAuth password = (OAuth) defaultClient.getAuthentication("password");
        password.setAccessToken("YOUR ACCESS TOKEN");

        AccessIdentifiersApi apiInstance = new AccessIdentifiersApi();
        try {
            AccessIdentifier result = apiInstance.createAccessIdentifier();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessIdentifiersApi#createAccessIdentifier");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://cloud.supla.org/api/v2.2.0

Class Method HTTP request Description
AccessIdentifiersApi createAccessIdentifier POST /accessids Create a new Access Identifier
AccessIdentifiersApi deleteAccessIdentifier DELETE /accessids/{id} Delete Access Identifier
AccessIdentifiersApi getAccessIdentifier GET /accessids/{id} Get Access Identifier
AccessIdentifiersApi getAccessIdentifiers GET /accessids Get Access Identifiers list
AccessIdentifiersApi updateAccessIdentifier PUT /accessids/{id} Update Access Identifier
ChannelGroupsApi createChannelGroup POST /channel-groups Create a new channel group
ChannelGroupsApi deleteChannelGroup DELETE /channel-groups/{id} Delete Channel Group
ChannelGroupsApi executeChannelGroupAction PATCH /channel-groups/{id} Execute action on the channel group
ChannelGroupsApi getChannelGroup GET /channel-groups/{id} Get channel group by ID
ChannelGroupsApi getChannelGroups GET /channel-groups Get channels list
ChannelGroupsApi updateChannelGroup PUT /channel-groups/{id} Update channel group
ChannelsApi executeAction PATCH /channels/{id} Execute action on the channel
ChannelsApi getChannel GET /channels/{id} Get channel by ID
ChannelsApi getChannelMeasurementLogs GET /channels/{id}/measurement-logs Get measurement logs.
ChannelsApi getChannelMeasurementLogsCsvFile GET /channels/{id}/measurement-logs-csv Get measurement logs as zipped CSV file.
ChannelsApi getChannelSchedules GET /channels/{id}/schedules Get schedules list of the channel
ChannelsApi getChannels GET /channels Get channels list
ChannelsApi updateChannel PUT /channels/{id} Update channel
ClientAppsApi deleteClientApp DELETE /client-apps/{id} Delete Client App
ClientAppsApi getClientApps GET /client-apps Get client apps
ClientAppsApi updateClientApp PUT /client-apps/{id} Update client app
IoDevicesApi deleteIoDevice DELETE /iodevices/{id} Delete IO Device
IoDevicesApi getIoDevice GET /iodevices/{id} Get IO Device
IoDevicesApi getIoDeviceChannels GET /iodevices/{id}/channels Get Channels that belong to IO Deice
IoDevicesApi getIoDevices GET /iodevices Get IO Devices
IoDevicesApi updateIoDevice PUT /iodevices/{id} Update IO Device
LocationsApi createLocation POST /locations Create a new location
LocationsApi deleteLocation DELETE /locations/{id} Delete location
LocationsApi getLocation GET /locations/{id} Get location by ID
LocationsApi getLocations GET /locations Get locations list
LocationsApi updateLocation PUT /locations/{id} Update location
SchedulesApi createSchedule POST /schedules Create a new schedule
SchedulesApi deleteSchedule DELETE /schedules/{id} Delete Schedule
SchedulesApi enableSchedules PATCH /schedules Enable schedules
SchedulesApi getSchedule GET /schedules/{id} Get Schedule
SchedulesApi getSchedules GET /schedules Get schedules list
SchedulesApi updateSchedule PUT /schedules/{id} Update schedule
ServerApi getServerInfo GET /server-info Get server info
ServerApi getSuplaServerStatus GET /server-status Get the SUPLA Server status
UsersApi getCurrentUser GET /users/current Get current user
UsersApi updateCurrentUser PATCH /users/current Update current user

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

password

  • Type: OAuth
  • Flow: password
  • Authorization URL:
  • Scopes:
    • restapi: full API access

Recommendation

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

Author

You can’t perform that action at this time.