Lantronix SGX 5150 IoT Device Gateway SGX 5150 Command Reference - Page 59
Javascript example:, Export Configuration Group, Parameters:, CURL example:
View all Lantronix SGX 5150 IoT Device Gateway manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 59 highlights
5: Configuration Using Web API Javascript example: myXmlhttprequest.open( "POST", "/export/status", true ); request.send( "optionalGroupList=Device" ); Export Configuration Group An HTTP POST request can be sent to the device to retrieve configuration information. Protocol: HTTP Method: POST URL: http:///export/config Parameters: optionalLine: Optional line index for line oriented XML groups optionalGroupList: Optional list of XML groups separated by semicolon. If omitted, all status groups will be returned. optionalBoolListOnly: Optional parameter if set to 'true' returns supported group list. CURL example: curl -u admin:PASSWORD http:///export/config -X POST curl -u admin:PASSWORD http:///export/config -X POST -d "optionalGroupList=Interface:wlan0" Javascript example: myXmlhttprequest.open( "POST", "/export/status", true ); request.send( "optionalGroupList=Interface:wlan0" ); Import Configuration Group An HTTP POST request can be sent to the device to set configuration. Protocol: HTTP Method: POST Content-Type: multipart/form-data URL: http:///import/config Parameters: configrecord: Content of configuration group in XML format. CURL example (configuration is saved in a local file config.xml): SGX 5150 IoT Device Gateway Command Reference 59