Anybus® Wireless Bolt IoT™ REST Commands REFERENCE GUIDE SCM-1202-156 1.
Important User Information Disclaimer The information in this document is for informational purposes only. Please inform HMS Industrial Networks of any inaccuracies or omissions found in this document. HMS Industrial Networks disclaims any responsibility or liability for any errors that may appear in this document. HMS Industrial Networks reserves the right to modify its products in line with its policy of continuous product development.
Table of Contents 1 Page Preface ................................................................................................................................. 3 1.1 About This Document .......................................................................................................3 1.2 Trademarks.....................................................................................................................3 2 Authentication..............................................................
This page intentionally left blank
Preface 3 (14) 1 Preface 1.1 About This Document This document describes the available REST commands for Wireless Bolt IoT. The reader of this document is expected to be familiar with the product and have a good knowledge of wireless communication and network technology. For additional related documentation, file downloads and technical support, please visit the Anybus support website at www.anybus.com/support. 1.2 Trademarks Anybus® is a registered trademark of HMS Industrial Networks.
Authentication 2 4 (14) Authentication All http requests to the REST API need to be authenticated using the "Basic HTTP Authentication Scheme" (RFC7617). Basic auth is done by adding a header-parameter to the HTTP-request: Authorization: Basic The user-id is always "admin" and the password is the web password currently in use, either the default password shipped with the product, or if it has been changed, the new password.
Public REST Commands 3 Public REST Commands 3.1 Read Configuration 5 (14) Read information from a configuration tree and present as JSON data. 3.1.1 Syntax GET /cgi-bin/readconfigtree.cgi?path= 3.1.2 3.1.3 Query Parameters Name Description target_ip IP address of the Bolt IoT device, e.g. 192.168.0.98 tree_path A path to the configuration tree or node to read Return Values A JSON structure with the requested data. 3.1.
Public REST Commands 3.2.2 6 (14) Query Parameters Name Description target_ip IP address of the Bolt IoT device, e.g. 192.168.0.98 tree_path A path to the tree and node to operate on new_value A value to write to the config tree type Must be one of bool, int, float, or string Note: if type is bool, then new_value must be either true or false. 3.2.3 Configuration Paths The following configuration paths can be modified by the user: 3.2.
Public REST Commands 3.3 7 (14) Backup Configuration Create and return a file with a backup of all settings in the device. 3.3.1 Syntax GET /cgi-bin/backup.cgi 3.3.2 Query Parameters None 3.3.3 Examples Query: GET http://192.168.0.98/cgi-bin/backup.cgi Response: 3.4 Restore Configuration Restore all settings in the device from a file. 3.4.1 Syntax POST /cgi-bin/restore.cgi 3.4.2 Query Parameters None 3.4.
Public REST Commands 3.5.1 8 (14) Syntax GET /cgi-bin/factoryreset.cgi 3.5.2 Query Parameters None 3.5.3 Return Values {"success":} 3.5.4 Value Description true Request completed successfully. false Request failed or config locked. Examples Query: GET http://192.168.0.98/cgi-bin/factoryreset.cgi Response: {"success":true} 3.6 Info Get runtime information. 3.6.1 Syntax GET /cgi-bin/info.cgi 3.6.2 Query Parameters None 3.6.
Public REST Commands Value 9 (14) Description 4: LTE operator Currently used operator status Network registration status 0: Not registered and not searching 1: Registered to home network 2: Searching for new operator 3: Registration denied 4: Registered to roaming network 5: Unknown state amplifier_temp Amplifier temperature in degrees Celcius controller_temp Controller temperature in degrees Celcius connection_state Data session state 0: Disconnected 1: Authenticating 2: Connected 3: Suspendin
Public REST Commands 3.7.2 10 (14) Query Parameters None 3.7.3 Return Values Plain text log file. 3.7.4 Examples Query: GET http://192.168.0.98/cgi-bin/log.cgi Response: Oct 9 10:03:18 Legato: INFO | Version: 1.00.18-dev Oct 9 10:03:18 Legato: INFO | Boot reason: Power-on Jan 6 00:00:23 Legato: INFO | eth0 IP address: 192.168.0.98 - netmask: 255.255.254.
Public REST Commands 3.9.1 11 (14) Syntax GET /cgi-bin/reboot.cgi 3.9.2 Query Parameters None 3.9.3 Return Values {"success":} 3.9.4 Value Description true Request completed successfully. false Request failed Examples Query: GET http://192.168.0.98/cgi-bin/reboot.cgi Response: {"success":true} 3.10 Ultra Low Power Mode Put the device in Ultra Low Power Mode for a specified duration. 3.10.1 Syntax GET /cgi-bin/ulpm.cgi?duration=
Public REST Commands 3.11 12 (14) Firmware Update Update the device firmware. 3.11.1 Syntax POST /cgi-bin/update.cgi 3.11.2 Query Parameters None 3.11.3 Post Data The contents of a firmware (.fws) file. 3.11.4 Return Values Raw HTML output of the firmware update process. Searching this for the strings "SUCCESS" or "FAILED" will give the result. 3.11.5 Examples Query: POST http://192.168.0.98/cgi-bin/update.cgi Response: Trying to update... Unpacking: 0% FAILED: error code 2 3.
This page intentionally left blank
last page © 2020 HMS Industrial Networks Box 4126 300 04 Halmstad, Sweden info@hms.se SCM-1202-156 1.