Applications
Use the local REST API to configure the Connect IT 16/48 device
Digi Connect IT® 16/48 User Guide
485
Use the POST method to modify device configuration parameters
and add items to a list array
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:
n
path
is the path to the configuration parameter, in dot notation (for example,
ssh.service.enable
).
n
new_value
is the new value for the parameter.
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 }
$
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" }
$
Use the DELETE method to remove items from a list array
To remove items from a list array, use the
DELETE
method. For example, using
curl
:
$ curl -k -u admin "https://192.168.210.1/cgi-bin/config.cgi/value?path=
path
where
path
is the path to the list item, including the list number, in dot notation (for example,
service.ssh.acl.zone.4
).
For example, to remove the external firewall zone to the ssh service:
1. Use the
GET
method to determine the SSH service's list number for the external zone:
$ curl -k -u admin "https://192.168.210.1/cgi-
bin/config.cgi/value/service/ssh/acl/zone -X GET
{
"ok": true,
"result": {
"type": "array",
"path": "service.ssh.acl.zone"
,
"collapsed": {
"0": "internal"
,
Содержание Connect IT 16
Страница 1: ...Digi Connect IT 16 48 User Guide Firmware version 21 2 ...
Страница 157: ...Interfaces Bridging Digi Connect IT 16 48 User Guide 157 8 Click Apply to save the configuration and apply the change ...
Страница 440: ...Services Configure the ping responder service Digi Connect IT 16 48 User Guide 440 iperf Done ...