tools

Summary

Resource Operation Description
Tools GET /api/app/v1/tools/(module)/arp Run arp
  GET /api/app/v1/tools/arp  
  GET /api/app/v1/tools/(module)/ethtool Run ethtool
  GET /api/app/v1/tools/ethtool  
  GET /api/app/v1/tools/(module)/ifconfig Run ifconfig
  GET /api/app/v1/tools/ifconfig  
  GET /api/app/v1/tools/(module)/nc Run nc
  GET /api/app/v1/tools/nc  
  GET /api/app/v1/tools/(module)/netstat Run netstat
  GET /api/app/v1/tools/netstat  
  GET /api/app/v1/tools/(module)/nslookup Run nslookup
  GET /api/app/v1/tools/nslookup  
  GET /api/app/v1/tools/(module)/ping Run ping
  GET /api/app/v1/tools/ping  
  GET /api/app/v1/tools/(module)/ping6 Run ping6
  GET /api/app/v1/tools/ping6  
  GET /api/app/v1/tools/(module)/route Run route
  GET /api/app/v1/tools/route  
  GET /api/app/v1/tools/(module)/route6 Run route6
  GET /api/app/v1/tools/route6  
  GET /api/app/v1/tools/(module)/top Run top
  GET /api/app/v1/tools/top  
  GET /api/app/v1/tools/(module)/traceroute Run traceroute
  GET /api/app/v1/tools/traceroute  
  GET /api/app/v1/tools/(module)/traceroute6 Run traceroute6
  GET /api/app/v1/tools/traceroute6  
  GET /api/app/v1/tools/(module)/wget Run wget
  GET /api/app/v1/tools/wget  
  GET /api/app/v1/tools/(module)/wget-proxy Run wget with proxy
  GET /api/app/v1/tools/wget-proxy  
  GET /api/app/v1/tools/ntpq Run ntpq
  GET /api/app/v1/tools/ntpstat Run ntpstat
  GET /api/app/v1/tools/tcpdump Run tcpdump
  GET /api/app/v1/tools/test_email Send test email

Details

GET /api/app/v1/tools/(module)/arp
GET /api/app/v1/tools/arp

Show the arp table on the appliance or module.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Show arp on the appliance:

GET /api/app/v1/tools/arp HTTP/1.1
Accept: text/html

Example 1 - Response: Show arp on the appliance:

HTTP/1.1 200 OK
Content-Type: text/html

Address                  HWtype  HWaddress           Flags Mask            Iface
wse                      ether   96:99:6d:d2:b4:31   C                     br-mgmt
10.206.6.60              ether   00:50:56:a2:0f:6c   C                     eth0
10.206.6.11              ether   00:50:56:a2:4d:85   C                     eth0
10.206.7.254             ether   00:10:f3:67:08:15   C                     eth0
na                       ether   c2:89:c6:be:5a:82   C                     br-mgmt
wcg                      ether   72:d7:e4:6c:eb:22   C                     br-mgmt
10.206.6.150             ether   00:50:56:a2:73:75   C                     eth0
GET /api/app/v1/tools/(module)/ethtool
GET /api/app/v1/tools/ethtool

Run ethtool command on appliance or a module.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Query Parameters:
 
  • interface (required) – Interface to run ethtool on
  • expression (optional) – Ethtool flag to execute
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run ethtool for eth0 on wcg:

GET /api/app/v1/tools/wcg/ethtool?interface=eth0 HTTP/1.1
Accept: text/html

Example 1 - Response: Run ethtool for eth0 on wcg:

HTTP/1.1 200 OK
Content-Type: text/html

Settings for eth0:
        Supported ports: [ ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 10000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
        MDI-X: Unknown
        Link detected: yes
GET /api/app/v1/tools/(module)/ifconfig
GET /api/app/v1/tools/ifconfig

Run ifconfig command on the appliance or a module.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Query Parameters:
 
  • interface (optional) – Interface to run ifconfig on
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run ifconfig on C:

GET /api/app/v1/tools/arp HTTP/1.1
Accept: text/html

Example 1 - Response: Run ifconfig on C:

HTTP/1.1 200 OK
Content-Type: text/html

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.206.6.67  netmask 255.255.252.0  broadcast 10.206.7.255
        inet6 fe80::c4c8:2ff:fe9d:2ed8  prefixlen 64  scopeid 0x20<link>
        ether c6:c8:02:9d:2e:d8  txqueuelen 1000  (Ethernet)
        RX packets 86789  bytes 7061978 (6.7 MiB)
        RX errors 0  dropped 242  overruns 0  frame 0
        TX packets 712  bytes 124328 (121.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
GET /api/app/v1/tools/(module)/nc
GET /api/app/v1/tools/nc

Run netcat on Centos6 and tcping on Centos7.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Query Parameters:
 
  • dest (required) – Destination ip address to connect to
  • port (required) – Port to connect accross
  • protocol (required) – Protocol to connect on (tcp, udp)
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Connect on port 80 to a server:

GET /api/app/v1/tools/nc?dest=10.206.6.60&protocol=tcp&port=80 HTTP/1.1
Accept: text/html

Example 1 - Response: Connect on port 80 to a server:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Connection to 10.206.6.60 80 port [tcp] succeeded!": "10.206.6.60"
}
GET /api/app/v1/tools/(module)/netstat
GET /api/app/v1/tools/netstat

Run netstat -an.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run netstat on the appliance:

GET /api/app/v1/tools/netstat HTTP/1.1
Accept: text/html

Example 1 - Response: Run netstat on the appliance:

HTTP/1.1 200 OK
Content-Type: text/html

NETSTAT OUTPUT
GET /api/app/v1/tools/(module)/nslookup
GET /api/app/v1/tools/nslookup

Run nslookup

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Query Parameters:
 
  • dns (optional) – DNS server to run the lookup against
  • host (required) – Host to perform the nslookup on
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run nslookup on www.google.com:

GET /api/app/v1/tools/nslookup?host=www.google.com HTTP/1.1
Accept: text/html

Example 1 - Response: Run nslookup on www.google.com:

HTTP/1.1 200 OK
Content-Type: text/html

Server:     10.51.80.10
Address:    10.51.80.10#53

Non-authoritative answer:
Name:   www.google.com
Address: 216.58.218.100

Example 2 - Request: Run nslookup on www.google.com on wcg:

GET /api/app/v1/tools/wcg/nslookup?host=www.google.com HTTP/1.1
Accept: text/html

Example 2 - Response: Run nslookup on www.google.com on wcg:

HTTP/1.1 200 OK
Content-Type: text/html

Server:     10.51.80.10
Address:    10.51.80.10#53

Non-authoritative answer:
Name:   www.google.com
Address: 216.58.218.100

Example 3 - Request: Run nslookup on www.google.com with specified DNS server:

GET /api/app/v1/tools/nslookup?host=www.google.com?dns=8.8.8.8 HTTP/1.1
Accept: text/html

Example 3 - Response: Run nslookup on www.google.com with specified DNS server:

HTTP/1.1 200 OK
Content-Type: text/html

Server:     10.51.80.11
Address:    10.51.80.11#53

Non-authoritative answer:
Name:   www.google.com
Address: 216.58.218.100
GET /api/app/v1/tools/(module)/ping
GET /api/app/v1/tools/ping

Run ping.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Query Parameters:
 
  • dest (required) – Destination to ping, can be ip or FQDN
  • interface (optional) – Interface to use in ping test
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Ping 8.8.8.8:

GET /api/app/v1/tools/ping?dest=8.8.8.8 HTTP/1.1
Accept: text/html

Example 1 - Response: Ping 8.8.8.8:

HTTP/1.1 200 OK
Content-Type: text/html

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=2 ttl=45 time=14.2 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=45 time=13.7 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=45 time=13.7 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=45 time=13.7 ms

--- 8.8.8.8 ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 4067ms
rtt min/avg/max/mdev = 13.708/13.857/14.238/0.220 ms
GET /api/app/v1/tools/(module)/ping6
GET /api/app/v1/tools/ping6

Run ping6.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Query Parameters:
 
  • dest (required) – IPv6 address to ping
  • interface (optional) – Interface to use in ping test
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run ping6 on 2001:4860:b002::68:

GET /api/app/v1/tools/ping6?dest= HTTP/1.1
Accept: text/html

Example 1 - Response: Run ping6 on 2001:4860:b002::68:

HTTP/1.1 200 OK
Content-Type: text/html

PING 2001:4860:b002::68 56 data bytes
64 bytes from 2001:4860:b002::68: icmp_seq=0 ttl=59 time=58.4 ms
64 bytes from 2001:4860:b002::68: icmp_seq=1 ttl=59 time=56.4 ms
64 bytes from 2001:4860:b002::68: icmp_seq=2 ttl=59 time=62.1 ms
64 bytes from 2001:4860:b002::68: icmp_seq=3 ttl=59 time=56.8 ms
64 bytes from 2001:4860:b002::68: icmp_seq=4 ttl=59 time=56.5 ms
64 bytes from 2001:4860:b002::68: icmp_seq=5 ttl=59 time=59.5 ms

--- ipv6.google.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5002ms
rtt min/avg/max/mdev = 56.443/58.329/62.150/2.045 ms, pipe 2
GET /api/app/v1/tools/(module)/route
GET /api/app/v1/tools/route

Run route -n.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run route -n:

GET /api/app/v1/tools/netstat HTTP/1.1
Accept: text/html

Example 1 - Response: Run route -n:

HTTP/1.1 200 OK
Content-Type: text/html

route -n OUTPUT
GET /api/app/v1/tools/(module)/route6
GET /api/app/v1/tools/route6

This function shows the route table for IPv6 (route -A inet6 -n)

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run route6 -n:

GET /api/app/v1/tools/netstat HTTP/1.1
Accept: text/html

Example 1 - Response: Run route6 -n:

HTTP/1.1 200 OK
Content-Type: text/html

route6 -n OUTPUT
GET /api/app/v1/tools/(module)/top
GET /api/app/v1/tools/top

Run top -bn1.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run top on the appliance:

GET /api/app/v1/tools/top HTTP/1.1
Accept: text/html

Example 1 - Response: Run top on the appliance:

HTTP/1.1 200 OK
Content-Type: text/html

TOP OUTPUT
GET /api/app/v1/tools/(module)/traceroute
GET /api/app/v1/tools/traceroute

Run traceroute.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Query Parameters:
 
  • dest (required) – Final target of the traceroute
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run traceroute:

GET /api/app/v1/tools/traceroute?dest=10.206.6.60 HTTP/1.1
Accept: text/html

Example 1 - Response: Run traceroute:

HTTP/1.1 200 OK
Content-Type: text/html

traceroute to 10.206.6.60 (10.206.6.60), 30 hops max, 60 byte packets
 1  10.206.6.60 (10.206.6.60)  1.067 ms  1.170 ms  1.072 ms
GET /api/app/v1/tools/(module)/traceroute6
GET /api/app/v1/tools/traceroute6

Run traceroute6.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Query Parameters:
 
  • dest (required) – Final target of the traceroute
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run traceroute6:

GET /api/app/v1/tools/traceroute6?dest=2001:4860:4860::8888 HTTP/1.1
Accept: text/html

Example 1 - Response: Run traceroute6:

HTTP/1.1 200 OK
Content-Type: text/html

traceroute6 OUTPUT
GET /api/app/v1/tools/(module)/wget
GET /api/app/v1/tools/wget

Run wget.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Query Parameters:
 
  • host (required) – Host to perform the wget on
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run wget on www.google.com:

GET /api/app/v1/tools/wget?host=www.google.com HTTP/1.1
Accept: text/html

Example 1 - Response: Run wget on www.google.com:

HTTP/1.1 200 OK
Content-Type: application/json

{"Error": "STATUS MESSAGE, NOT REAL ERROR"}
GET /api/app/v1/tools/(module)/wget-proxy
GET /api/app/v1/tools/wget-proxy

Run wget -e use_proxy=yes. This function does wget -e use_proxy=yes -e http_proxy=<proxy_ip>:<port> <host>” Required args are the host address, proxy_ip address and port

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Query Parameters:
 
  • host (required) – Host to perform the wget on
  • proxy_ip (required) – IP address of the proxy
  • port (required) – Port to use on the proxy
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run wget on www.google.com through proxy:

GET /api/app/v1/tools/wget?host=www.google.com&proxy_ip=10.206.6.194&port=3128 HTTP/1.1
Accept: text/html

Example 1 - Response: Run wget on www.google.com through proxy:

HTTP/1.1 200 OK
Content-Type: application/json

{"Error": "STATUS MESSAGE, NOT REAL ERROR"}
GET /api/app/v1/tools/ntpq

Run ntpa -p.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run ntpa -p:

GET /api/app/v1/tools/ntpq HTTP/1.1
Accept: text/html

Example 1 - Response: Run ntpq -p:

HTTP/1.1 200 OK
Content-Type: text/html

ntpq -p OUTPUT
GET /api/app/v1/tools/ntpstat

Run ntpa -p.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Run ntpa -p:

GET /api/app/v1/tools/ntpstat HTTP/1.1
Accept: text/html

Example 1 - Response: Run ntpstat:

HTTP/1.1 200 OK
Content-Type: text/html

ntpstat OUTPUT
GET /api/app/v1/tools/tcpdump

Stream the output of tcpdump.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Parameters:
  • module (optional) – Module to perform the command from, if omitted perform the command on the appliance
Query Parameters:
 
  • timeout (required) – Timeout for the stream
  • inteface (optional) – Inteface to listen across
  • expression (optional) – Command line args, such as -v
  • file (optional) – Name of file to save tcpdump
  • location (optional) – Filestore alias to save the pcap file to
  • url (optional) – URL of the location in which to store the tcpdump output
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Stream tcpdump on eth0:

GET /api/app/v1/tools/tcpdump?timeout=30&interface=eth0 HTTP/1.1
Accept: text/html

Example 1 - Response: Stream tcpdump on eth0:

HTTP/1.1 200 OK
Content-Type: text/html

TCPDUMP OUTPUT

Example 2 - Request: Stream tcpdump on eth0 and store pcap on a filestore:

GET /api/app/v1/tools/tcpdump?timeout=20&interface=eth0&location=myfilestore&file=mason.pcap HTTP/1.1
Accept: text/html

Example 2 - Response: Stream tcpdump on eth0 and store pcap on a filestore:

HTTP/1.1 200 OK
Content-Type: application/json

{"Error": "STATUS MESSAGE, NOT REAL ERROR"}
GET /api/app/v1/tools/test_email

Send an email via SMTP to test settings.

Note

Must first configure SMTP settings.

Warning

This command returns unescaped characters such as Unix new line character and octothorpe

New in version 1.0.

Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin, audit

Example 1 - Request: Send test email:

GET /api/app/v1/tools/test_email HTTP/1.1
Accept: text/html

Example 1 - Response: Send test email:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Status": "Success"
}