Skip to content

Latest commit

 

History

History
executable file
·
339 lines (232 loc) · 9.48 KB

DeviceTypesApi.md

File metadata and controls

executable file
·
339 lines (232 loc) · 9.48 KB

ArtikCloud.DeviceTypesApi

All URIs are relative to https://api.artik.cloud/v1.1

Method HTTP request Description
getAvailableManifestVersions GET /devicetypes/{deviceTypeId}/availablemanifestversions Get Available Manifest Versions
getDeviceType GET /devicetypes/{deviceTypeId} Get Device Type
getDeviceTypes GET /devicetypes Get Device Types
getDeviceTypesByApplication GET /applications/{appId}/devicetypes Get Device Types by Application
getLatestManifestProperties GET /devicetypes/{deviceTypeId}/manifests/latest/properties Get Latest Manifest Properties
getManifestProperties GET /devicetypes/{deviceTypeId}/manifests/{version}/properties Get manifest properties

getAvailableManifestVersions

ManifestVersionsEnvelope getAvailableManifestVersions(deviceTypeId)

Get Available Manifest Versions

Get a Device Type's available manifest versions

Example

var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;

// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"

var apiInstance = new ArtikCloud.DeviceTypesApi()

var deviceTypeId = "deviceTypeId_example"; // {String} deviceTypeId


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAvailableManifestVersions(deviceTypeId, callback);

Parameters

Name Type Description Notes
deviceTypeId String deviceTypeId

Return type

ManifestVersionsEnvelope

Authorization

artikcloud_oauth

HTTP reuqest headers

  • Content-Type: Not defined
  • Accept: application/json

getDeviceType

DeviceTypeEnvelope getDeviceType(deviceTypeId)

Get Device Type

Retrieves a Device Type

Example

var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;

// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"

var apiInstance = new ArtikCloud.DeviceTypesApi()

var deviceTypeId = "deviceTypeId_example"; // {String} deviceTypeId


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDeviceType(deviceTypeId, callback);

Parameters

Name Type Description Notes
deviceTypeId String deviceTypeId

Return type

DeviceTypeEnvelope

Authorization

artikcloud_oauth

HTTP reuqest headers

  • Content-Type: Not defined
  • Accept: application/json

getDeviceTypes

DeviceTypesEnvelope getDeviceTypes(name, opts)

Get Device Types

Retrieves Device Types

Example

var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;

// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"

var apiInstance = new ArtikCloud.DeviceTypesApi()

var name = "name_example"; // {String} Device Type name

var opts = { 
  'offset': 56, // {Number} Offset for pagination.
  'count': 56, // {Number} Desired count of items in the result set
  'tags': "tags_example" // {String} Elements tagged with the list of tags. (comma separated)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDeviceTypes(name, opts, callback);

Parameters

Name Type Description Notes
name String Device Type name
offset Number Offset for pagination. [optional]
count Number Desired count of items in the result set [optional]
tags String Elements tagged with the list of tags. (comma separated) [optional]

Return type

DeviceTypesEnvelope

Authorization

artikcloud_oauth

HTTP reuqest headers

  • Content-Type: Not defined
  • Accept: application/json

getDeviceTypesByApplication

DeviceTypesEnvelope getDeviceTypesByApplication(appId, opts)

Get Device Types by Application

Get Device Types by Application

Example

var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;

// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"

var apiInstance = new ArtikCloud.DeviceTypesApi()

var appId = "appId_example"; // {String} Application ID.

var opts = { 
  'productInfo': true, // {Boolean} Flag to include the associated ProductInfo if present
  'count': 56, // {Number} Desired count of items in the result set.
  'offset': 56 // {Number} Offset for pagination.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDeviceTypesByApplication(appId, opts, callback);

Parameters

Name Type Description Notes
appId String Application ID.
productInfo Boolean Flag to include the associated ProductInfo if present [optional]
count Number Desired count of items in the result set. [optional]
offset Number Offset for pagination. [optional]

Return type

DeviceTypesEnvelope

Authorization

artikcloud_oauth

HTTP reuqest headers

  • Content-Type: Not defined
  • Accept: application/json

getLatestManifestProperties

ManifestPropertiesEnvelope getLatestManifestProperties(deviceTypeId)

Get Latest Manifest Properties

Get a Device Type's manifest properties for the latest version.

Example

var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;

// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"

var apiInstance = new ArtikCloud.DeviceTypesApi()

var deviceTypeId = "deviceTypeId_example"; // {String} Device Type ID.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLatestManifestProperties(deviceTypeId, callback);

Parameters

Name Type Description Notes
deviceTypeId String Device Type ID.

Return type

ManifestPropertiesEnvelope

Authorization

artikcloud_oauth

HTTP reuqest headers

  • Content-Type: Not defined
  • Accept: application/json

getManifestProperties

ManifestPropertiesEnvelope getManifestProperties(deviceTypeId, version)

Get manifest properties

Get a Device Type's manifest properties for a specific version.

Example

var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;

// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"

var apiInstance = new ArtikCloud.DeviceTypesApi()

var deviceTypeId = "deviceTypeId_example"; // {String} Device Type ID.

var version = "version_example"; // {String} Manifest Version.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getManifestProperties(deviceTypeId, version, callback);

Parameters

Name Type Description Notes
deviceTypeId String Device Type ID.
version String Manifest Version.

Return type

ManifestPropertiesEnvelope

Authorization

artikcloud_oauth

HTTP reuqest headers

  • Content-Type: Not defined
  • Accept: application/json