
//widget.html file content <!DOCTYPE html> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Zoho IOT - Apps</title> </head> <body> <h2>This is a sample App built using ZET CLI.</h2> <div id="response" style="white-space: pre;"></div> <script src="https://static.zohocdn.com/sigma/client/sdk/v3/sigma-sdk.min.js"></script> <script> window.ZIOT = {}; window.ZIOT.getIoTSDK = ()=>{ let promise = new Promise((resolve)=>{ window.ZIOT.iotSDK = SigmaSDK.IOT.init(()=>{ resolve(); }); }); return promise; }; ZIOT.getIoTSDK().then(()=>{ ZIOT.iotSDK.get(['records', 'devices', '', {per_page: 1, lookup_type: 'quick'}]).then((response) => { if(response){ document.querySelector('div#response').innerText = JSON.stringify(response.records, null, '\t'); } }); }); </script> </body> </html> |
<script src="https://static.zohocdn.com/sigma/client/sdk/v3/sigma-sdk.min.js"></script> |

window.ZIOT = {}; window.ZIOT.getIoTSDK = ()=>{ let promise = new Promise((resolve)=>{ window.ZIOT.iotSDK = SigmaSDK.IOT.init(()=>{ resolve(); }); }); return promise; }; |
ZIOT.getIoTSDK().then(()=>{ ZIOT.iotSDK.get(['records', 'devices', '', {per_page: 1, lookup_type: 'quick'}]).then((response) => { if(response){ document.querySelector('div#response').innerText = JSON.stringify(response.records, null, '\t'); //your logic here } }); }); |
$ ZET validate |
$ ZET pack |

Use this to get current logged in user details
Sample: GET ZIOT.iotSDK.get('current-user')
ZIOT.iotSDK.get('current-user').then((response)=>{//your logic});
Response can be used to include own logic.
Use this to get org/application detailsSample: GET ZIOT.iotSDK.get('app_info')
ZIOT.iotSDK.get('app_info').then((response)=>{//your logic});
Use this to get client portal details
Sample: GET ZIOT.iotSDK.get('client_portal_meta')
ZIOT.iotSDK.get('client_portal_meta').then((response)=>{//your logic});
Use this to get records array by module (Get Records API) with pagination
Sample: GET ZIOT.iotSDK.get(['records', '<module_apiname>', '', queryparams])
ZIOT.iotSDK.get(['records', '<module_apiname>', '', queryparams]).then((response) => {// your logic});
Use this to get record by module
Sample: GET ZIOT.iotSDK.get(['record', '<module_apiname>', <record_id>, queryparams])
ZIOT.iotSDK.get(['record', '<module_apiname>', <record_id>, queryparams]).then((response) => {// your logic});
Refer to API documentation for query params.
Sample: GET ZIOT.iotSDK.get(['modules', '<module_apiname>', queryparams]);
ZIOT.iotSDK.get(['modules', '<module_apiname>', queryparams]).then((response) => {// your logic});
Refer to API documentation for query params.
Use this to get records count by moduleSample: GET ZIOT.iotSDK.get(['records_total_count', <module_api>, queryparam]);
ZIOT.iotSDK.get(['records_total_count', <module_api>, queryparam]).then((response) => {// your logic});Refer to API documentation for query params.
Use this to get related record count by moduleSample: GET ZIOT.iotSDK.get(['records_total_count', <module_api>, <record_id>, <related_list_api_name>, queryParam]);
ZIOT.iotSDK.get(['related-records', <module_apiname>, <record_id>, <related_list_api_name>, queryParam]).then((response) => {// your logic});Refer to API documentation for query params.
Sample: GET ZIOT.iotSDK.get(['records_total_count', <module_api>, <record_id>, <related_list_api_name>]);
ZIOT.iotSDK.get(['related-records', <module_api>, <record_id>, <related_list_api_name>]).then((response) => {// your logic});
Use this to get BD data by giving datapoint name and source nameSample: GET ZIOT.iotSDK.get(['datapoints_data', queryparam]);
let queryparam = {source: <record name>,datapoint_name: <datapoint_name>,days: 1,hrs: 4,aggregation: 'avg',time_grouping: 'hour'};ZIOT.iotSDK.get(['datapoints_data',queryparam]).then((response)=>{//Your logic});
Use this to create a record for a module
Sample: GET ZIOT.iotSDK.dispatch('createRecord', {module: <module_apiname>, data: {}});
ZIOT.iotSDK.dispatch('createRecord', {//No I18Nmodule: <module_apiname>,//No I18Ndata: {<module_apiname>: {}}}).then((response)=>{//Yur logic});
Use this to update a record for a moduleSample: PUT ZIOT.iotSDK.dispatch('updateRecord', {module: <module_apiname>, data: {}});
ZIOT.iotSDK.dispatch('updateRecord', {//No I18Nmodule: <module_apiname>,//No I18Ndata: {<module_apiname>: {}}}).then((response)=>{//Yur logic});
Use this to delete a record for a moduleSample: DELETE ZIOT.iotSDK.dispatch('deleteRecord', {module: <module_apiname>, id: <record_id>});
ZIOT.iotSDK.dispatch('deleteRecord', {//No I18Nmodule: <module_apiname>,//No I18Nid: <record_id>}).then((response)=>{//your logic});
Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.
If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.
You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.