Skip to content

Latest commit

 

History

History
346 lines (252 loc) · 10.9 KB

DeviceTypesApi.md

File metadata and controls

346 lines (252 loc) · 10.9 KB

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

// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.DeviceTypesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");

DeviceTypesApi apiInstance = new DeviceTypesApi();
String deviceTypeId = "deviceTypeId_example"; // String | deviceTypeId
try {
    ManifestVersionsEnvelope result = apiInstance.getAvailableManifestVersions(deviceTypeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceTypesApi#getAvailableManifestVersions");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
deviceTypeId String deviceTypeId

Return type

ManifestVersionsEnvelope

Authorization

artikcloud_oauth

HTTP request headers

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

getDeviceType

DeviceTypeEnvelope getDeviceType(deviceTypeId)

Get Device Type

Retrieves a Device Type

Example

// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.DeviceTypesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");

DeviceTypesApi apiInstance = new DeviceTypesApi();
String deviceTypeId = "deviceTypeId_example"; // String | deviceTypeId
try {
    DeviceTypeEnvelope result = apiInstance.getDeviceType(deviceTypeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceTypesApi#getDeviceType");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
deviceTypeId String deviceTypeId

Return type

DeviceTypeEnvelope

Authorization

artikcloud_oauth

HTTP request headers

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

getDeviceTypes

DeviceTypesEnvelope getDeviceTypes(name, offset, count, tags)

Get Device Types

Retrieves Device Types

Example

// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.DeviceTypesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");

DeviceTypesApi apiInstance = new DeviceTypesApi();
String name = "name_example"; // String | Device Type name
Integer offset = 56; // Integer | Offset for pagination.
Integer count = 56; // Integer | Desired count of items in the result set
String tags = "tags_example"; // String | Elements tagged with the list of tags. (comma separated)
try {
    DeviceTypesEnvelope result = apiInstance.getDeviceTypes(name, offset, count, tags);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceTypesApi#getDeviceTypes");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
name String Device Type name
offset Integer Offset for pagination. [optional]
count Integer 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 request headers

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

getDeviceTypesByApplication

DeviceTypesEnvelope getDeviceTypesByApplication(appId, productInfo, count, offset)

Get Device Types by Application

Get Device Types by Application

Example

// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.DeviceTypesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");

DeviceTypesApi apiInstance = new DeviceTypesApi();
String appId = "appId_example"; // String | Application ID.
Boolean productInfo = true; // Boolean | Flag to include the associated ProductInfo if present
Integer count = 56; // Integer | Desired count of items in the result set.
Integer offset = 56; // Integer | Offset for pagination.
try {
    DeviceTypesEnvelope result = apiInstance.getDeviceTypesByApplication(appId, productInfo, count, offset);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceTypesApi#getDeviceTypesByApplication");
    e.printStackTrace();
}

Parameters

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

Return type

DeviceTypesEnvelope

Authorization

artikcloud_oauth

HTTP request 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

// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.DeviceTypesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");

DeviceTypesApi apiInstance = new DeviceTypesApi();
String deviceTypeId = "deviceTypeId_example"; // String | Device Type ID.
try {
    ManifestPropertiesEnvelope result = apiInstance.getLatestManifestProperties(deviceTypeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceTypesApi#getLatestManifestProperties");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
deviceTypeId String Device Type ID.

Return type

ManifestPropertiesEnvelope

Authorization

artikcloud_oauth

HTTP request 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

// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.DeviceTypesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");

DeviceTypesApi apiInstance = new DeviceTypesApi();
String deviceTypeId = "deviceTypeId_example"; // String | Device Type ID.
String version = "version_example"; // String | Manifest Version.
try {
    ManifestPropertiesEnvelope result = apiInstance.getManifestProperties(deviceTypeId, version);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceTypesApi#getManifestProperties");
    e.printStackTrace();
}

Parameters

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

Return type

ManifestPropertiesEnvelope

Authorization

artikcloud_oauth

HTTP request headers

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