Use The Post Method To Modify Device Configuration Parameters And List Arrays - Digi Connect EZ Mini User Manual

Firmware version 22.2
Hide thumbs Also See for Connect EZ Mini:
Table of Contents

Advertisement

Configuration and management
"mdns.name": ""
,
"mdns.type": "_ssh._tcp."
,
"port": "22"
,
"protocol.0": "tcp"
}
}
$
You can also use the GET method to return the configuration parameters associated with an item:
curl -k -u admin https://192.168.210.1/cgi-bin/config.cgi/keys/service/ssh -X
GET
Enter host password for user 'admin':
{ "ok": true, "result": [ "acl", "enable", "key", "mdns", "port", "protocol" ]
}
$
Use the POST method to modify device configuration parameters
and list arrays
Use the POST method to modify device configuration parameters
To modify configuration parameters, use the POST method with the path and value parameters.
$ curl -k -u admin "https://ip-address/cgi-
bin/config.cgi/value?path=path&value=new_value" -X POST
where:
path is the path to the configuration parameter, in dot notation (for example,
n
ssh.service.enable).
new_value is the new value for the parameter.
n
For example, to disable the ssh service using curl:
$ curl -k -u admin "https://192.168.210.1/cgi-
bin/config.cgi/value?path=service.ssh.enable&value=false" -X POST
Enter host password for user 'admin':
{ "ok": true }
$
Use the POST method to add items to a list array
To add items to a list array, use the POST method with the path and append parameters. For
example, to add the external firewall zone to the ssh service:
$ curl -k -u admin "https://192.168.210.1/cgi-
bin/config.cgi/value?path=service.ssh.acl.zone&append=true&value=external" -X
POST
Enter host password for user 'admin':
{ "ok": true, "result": "service.ssh.acl.zone.4" }
$
Digi Connect EZ Mini User Guide
Use the local REST API to configure the Connect EZ device
}
44

Advertisement

Table of Contents
loading

Table of Contents