Skip to content

Latest commit

 

History

History
366 lines (254 loc) · 12 KB

RegistryApi.md

File metadata and controls

366 lines (254 loc) · 12 KB

OmniCoreModelAndStateManagementApi.RegistryApi

All URIs are relative to https://api.korewireless.com

Method HTTP request Description
createRegistry POST /omnicore/subscriptions/{subscriptionId}/registries
deleteRegistry DELETE /omnicore/subscriptions/{subscriptionId}/registries/{registryId}
getRegistries GET /omnicore/subscriptions/{subscriptionId}/registries
getRegistry GET /omnicore/subscriptions/{subscriptionId}/registries/{registryId}
sendBroadcastToDevices POST /omnicore/subscriptions/{subscriptionid}/registries/{registryId}/sendBroadcastToDevice
updateRegistry PATCH /omnicore/subscriptions/{subscriptionId}/registries/{registryId}

createRegistry

DeviceRegistry createRegistry(subscriptionId, opts)

Create a registry

Example

import OmniCoreModelAndStateManagementApi from 'omni_core_model_and_state_management_api';
let defaultClient = OmniCoreModelAndStateManagementApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new OmniCoreModelAndStateManagementApi.RegistryApi();
let subscriptionId = "subscriptionId_example"; // String | Subscription ID
let opts = {
  'registry': new OmniCoreModelAndStateManagementApi.DeviceRegistry() // DeviceRegistry | application/json
};
apiInstance.createRegistry(subscriptionId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
subscriptionId String Subscription ID
registry DeviceRegistry application/json [optional]

Return type

DeviceRegistry

Authorization

apiKey, bearerAuth

HTTP request headers

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

deleteRegistry

Info deleteRegistry(subscriptionId, registryId)

Delete a registry

Example

import OmniCoreModelAndStateManagementApi from 'omni_core_model_and_state_management_api';
let defaultClient = OmniCoreModelAndStateManagementApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new OmniCoreModelAndStateManagementApi.RegistryApi();
let subscriptionId = "subscriptionId_example"; // String | Subscription ID
let registryId = "registryId_example"; // String | Registry ID
apiInstance.deleteRegistry(subscriptionId, registryId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
subscriptionId String Subscription ID
registryId String Registry ID

Return type

Info

Authorization

apiKey, bearerAuth

HTTP request headers

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

getRegistries

ListDeviceRegistries getRegistries(subscriptionId, opts)

Get all registries under a subscription

Example

import OmniCoreModelAndStateManagementApi from 'omni_core_model_and_state_management_api';
let defaultClient = OmniCoreModelAndStateManagementApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new OmniCoreModelAndStateManagementApi.RegistryApi();
let subscriptionId = "subscriptionId_example"; // String | Subscription ID
let opts = {
  'pageNumber': 56, // Number | Page Number
  'pageSize': 56, // Number | Page Size
  'registryIds': ["null"] // [String] | A list of registry string IDs. For example, ['registry0', 'registry12']. If empty, this field is ignored. Maximum IDs: 10,000
};
apiInstance.getRegistries(subscriptionId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
subscriptionId String Subscription ID
pageNumber Number Page Number [optional]
pageSize Number Page Size [optional]
registryIds [String] A list of registry string IDs. For example, ['registry0', 'registry12']. If empty, this field is ignored. Maximum IDs: 10,000 [optional]

Return type

ListDeviceRegistries

Authorization

apiKey, bearerAuth

HTTP request headers

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

getRegistry

DeviceRegistry getRegistry(subscriptionId, registryId)

Get a registry

Example

import OmniCoreModelAndStateManagementApi from 'omni_core_model_and_state_management_api';
let defaultClient = OmniCoreModelAndStateManagementApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new OmniCoreModelAndStateManagementApi.RegistryApi();
let subscriptionId = "subscriptionId_example"; // String | Subscription ID
let registryId = "registryId_example"; // String | Registry ID
apiInstance.getRegistry(subscriptionId, registryId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
subscriptionId String Subscription ID
registryId String Registry ID

Return type

DeviceRegistry

Authorization

apiKey, bearerAuth

HTTP request headers

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

sendBroadcastToDevices

Object sendBroadcastToDevices(subscriptionid, registryId, broadcast)

Send Broadcast To Devices

Example

import OmniCoreModelAndStateManagementApi from 'omni_core_model_and_state_management_api';
let defaultClient = OmniCoreModelAndStateManagementApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new OmniCoreModelAndStateManagementApi.RegistryApi();
let subscriptionid = "subscriptionid_example"; // String | Subscription ID
let registryId = "registryId_example"; // String | Registry ID
let broadcast = new OmniCoreModelAndStateManagementApi.DeviceCommand(); // DeviceCommand | application/json
apiInstance.sendBroadcastToDevices(subscriptionid, registryId, broadcast, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
subscriptionid String Subscription ID
registryId String Registry ID
broadcast DeviceCommand application/json

Return type

Object

Authorization

apiKey, bearerAuth

HTTP request headers

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

updateRegistry

DeviceRegistry updateRegistry(subscriptionId, registryId, updateMask, opts)

Update a registry

Example

import OmniCoreModelAndStateManagementApi from 'omni_core_model_and_state_management_api';
let defaultClient = OmniCoreModelAndStateManagementApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new OmniCoreModelAndStateManagementApi.RegistryApi();
let subscriptionId = "subscriptionId_example"; // String | Subscription ID
let registryId = "registryId_example"; // String | Registry ID
let updateMask = "updateMask_example"; // String | values to be updated: eventNotificationConfigs,stateNotificationConfig.pubsub_topic_name,logNotificationConfig.pubsub_topic_name,customOnboardNotificationConfig.pubsub_topic_name,mqttConfig.mqtt_enabled_state,httpConfig.http_enabled_state,logLevel,credentials,customOnboardEnabled
let opts = {
  'registry': new OmniCoreModelAndStateManagementApi.DeviceRegistry() // DeviceRegistry | application/json
};
apiInstance.updateRegistry(subscriptionId, registryId, updateMask, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
subscriptionId String Subscription ID
registryId String Registry ID
updateMask String values to be updated: eventNotificationConfigs,stateNotificationConfig.pubsub_topic_name,logNotificationConfig.pubsub_topic_name,customOnboardNotificationConfig.pubsub_topic_name,mqttConfig.mqtt_enabled_state,httpConfig.http_enabled_state,logLevel,credentials,customOnboardEnabled
registry DeviceRegistry application/json [optional]

Return type

DeviceRegistry

Authorization

apiKey, bearerAuth

HTTP request headers

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