@conradconnect/paas-api

This project is a javascript SDK for the Conrad Connect PaaS API.

Usage no npm install needed!

<script type="module">
  import conradconnectPaasApi from 'https://cdn.skypack.dev/@conradconnect/paas-api';
</script>

README

@conradconnect/paas-api

ConradConnectPaasApi - JavaScript client for @conradconnect/paas-api This document is strictly private, confidential and personal to its recipients and should not be copied, distributed or reproduced in whole or in part, nor passed to any third party. Defines the initial endpoints of the backend supported by CC that are relevant for the PaaS solution. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.1.1-beta2
  • Package version: 1.1.1-beta2
  • Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install @conradconnect/paas-api --save

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

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

var ConradConnectPaasApi = require('@conradconnect/paas-api');
var defaultClient = ConradConnectPaasApi.ApiClient.instance;


var api = new ConradConnectPaasApi.ActionButtonInteractionApi()
var project = "project_example"; // {String} Project id
var opts = { 
  'body': new ConradConnectPaasApi.ExecuteActionButtonProjectBody() // {ExecuteActionButtonProjectBody} 
};
api.executeActionButtonProject(project, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://dashboard.conradconnect.de/paasapi/

Class Method HTTP request Description
ConradConnectPaasApi.ActionButtonInteractionApi executeActionButtonProject POST /abstraction/do/{project}
ConradConnectPaasApi.ActionButtonInteractionApi listActionButtonProjects GET /abstraction/do
ConradConnectPaasApi.DeviceInteractionApi actuateDevice POST /abstraction/device/{device}/actuate Perform an action on a device
ConradConnectPaasApi.DeviceInteractionApi getDeviceDataForProperty GET /abstraction/device/{device}/data/{property} Get historical data for a readable property of a device
ConradConnectPaasApi.DeviceInteractionApi getDeviceEventSubscriptions GET /abstraction/subscriptions Get a list of running subscriptions, started by the abstraction API
ConradConnectPaasApi.DeviceInteractionApi getDeviceTypes GET /abstraction/device-types Returns a list of supported device types
ConradConnectPaasApi.DeviceInteractionApi getDevicesSummary GET /abstraction/list-all Returns the current state of the abstraction layer with complete list of all currently used types and property and event names.
ConradConnectPaasApi.DeviceInteractionApi getLatestDeviceDataForProperty GET /abstraction/device/{device}/data/{property}/latest Get the latest value for a readable property of a device
ConradConnectPaasApi.DeviceInteractionApi getUserDevices GET /abstraction/device Query devices of a user
ConradConnectPaasApi.DeviceInteractionApi subscribeToDeviceEvent POST /abstraction/device/{device}/event Subscribe to an event of a device
ConradConnectPaasApi.DeviceInteractionApi unsubscribeFromDeviceEvent DELETE /abstraction/event/{subscription} Unsubscribes from an event
ConradConnectPaasApi.OAuthEndpointsApi postOauthPassword POST /oauth/token#p Exchange either a username and password for an access and refresh token.
ConradConnectPaasApi.OAuthEndpointsApi postOauthRefresh POST /oauth/token#r Exchange either a refresh token for an access token.
ConradConnectPaasApi.ProviderAuthenticationManagementApi connectProvider POST /providers/{provider}/connect
ConradConnectPaasApi.ProviderAuthenticationManagementApi disconnectProvider POST /providers/{provider}/disconnect
ConradConnectPaasApi.ProviderAuthenticationManagementApi disconnectProviderAndDeleteData POST /providers/{provider}/disconnect-and-delete-data
ConradConnectPaasApi.ProviderAuthenticationManagementApi getProvidersList GET /providers
ConradConnectPaasApi.ProviderAuthenticationManagementApi refreshProvider POST /providers/{provider}/refresh
ConradConnectPaasApi.TemperatureSchedulesApi createTemperatureSchedule POST /temperature-schedules Create a temperature schedule
ConradConnectPaasApi.TemperatureSchedulesApi deleteTemperatureSchedule DELETE /temperature-schedules/{schedule} Delete a temperature schedule by ID
ConradConnectPaasApi.TemperatureSchedulesApi getTemperatureSchedule GET /temperature-schedules/{schedule} Get a temperature schedule by ID
ConradConnectPaasApi.TemperatureSchedulesApi getTemperatureSchedules GET /temperature-schedules Get a list of temperature schedules
ConradConnectPaasApi.UserManagementApi createUser POST /users Create a new user
ConradConnectPaasApi.UserManagementApi deleteMe DELETE /users/me Delete authenticated user
ConradConnectPaasApi.UserManagementApi getMe GET /users/me Get authenticated user
ConradConnectPaasApi.UserManagementApi getUsers GET /users Get the list of accessible users
ConradConnectPaasApi.UserManagementApi updateMe PATCH /users/me Update authenticated user
ConradConnectPaasApi.UserStatisticsApi getStats GET /stats/users-with-devices Get the list of users with devices and the number of devices per provider

Documentation for Models

Documentation for Authorization

accessToken

httpBasicClientCredentials

  • Type: HTTP basic authentication