
Configuration and management
Use the local REST API to configure the AnywhereUSB Plus device
AnywhereUSB® Plus User Guide
88
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" }
$
Use the POST method to add objects to a list array
Objects in an array that require one or more underlying values can be set using the
collapsed
URI
parameter. The below example would add a new static route for the WAN interface for the 1.2.4.0/24
destination network:
$ curl -k -u admin "https://192.168.210.1/cgi-
bin/config.cgi/value?pathnetwork.route.static&append=true&collapsed
[dst]=1.2.4.0/24&collapsed[interface]=/network/interface/wan' -X POST-X POST
Enter host password for user 'admin':
{ "ok": true, "result": "network.route.static.1" }
$
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"
,
"1": "edge"
,
"2": "ipsec"
,
"3": "setup"
,
"4": "external"
Содержание AnywhereUSB Plus
Страница 1: ...AnywhereUSB Plus User Guide Firmware version 21 8 ...
Страница 212: ...Interfaces Bridging AnywhereUSB Plus User Guide 212 ...
Страница 308: ...Services Configure the ping responder service AnywhereUSB Plus User Guide 308 iperf Done ...
Страница 509: ...File system Upload and download files AnywhereUSB Plus User Guide 509 sftp exit ...
Страница 604: ...Virtual Private Networks VPN IPsec AnywhereUSB Plus User Guide 604 ...
Страница 710: ...Command line interface Command line reference AnywhereUSB Plus User Guide 710 more path The file to view Syntax STRING ...
Страница 714: ...Command line interface Command line reference AnywhereUSB Plus User Guide 714 reboot Reboot the system Parameters None ...
Страница 775: ...Configure the AnywhereUSB Manager from the command line power cycle AnywhereUSB Plus User Guide 775 ...