From de581eef5ce0c143cdcd0db90dee24a8744460db Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 18 Sep 2023 13:19:28 +0200 Subject: [PATCH] update api docs (using scripts) --- source/development/api/core/dhcpv4.rst | 19 +++++++ source/development/api/core/dhcpv6.rst | 20 +++++++ source/development/api/core/interfaces.rst | 15 +++++ source/development/api/core/openvpn.rst | 2 +- source/development/api/core/unbound.rst | 2 +- source/development/api/plugins/quagga.rst | 27 +++------ source/development/api/plugins/wazuhagent.rst | 23 ++++++++ source/development/api/plugins/wireguard.rst | 57 +++++++++++++++++++ 8 files changed, 145 insertions(+), 20 deletions(-) create mode 100644 source/development/api/core/dhcpv4.rst create mode 100644 source/development/api/core/dhcpv6.rst create mode 100644 source/development/api/plugins/wazuhagent.rst diff --git a/source/development/api/core/dhcpv4.rst b/source/development/api/core/dhcpv4.rst new file mode 100644 index 00000000..a3040dcf --- /dev/null +++ b/source/development/api/core/dhcpv4.rst @@ -0,0 +1,19 @@ +Dhcpv4 +~~~~~~ + +.. csv-table:: Resources (LeasesController.php) + :header: "Method", "Module", "Controller", "Command", "Parameters" + :widths: 4, 15, 15, 30, 40 + + "``POST``","dhcpv4","leases","delLease","$ip" + "``GET``","dhcpv4","leases","searchLease","" + +.. csv-table:: Service (ServiceController.php) + :header: "Method", "Module", "Controller", "Command", "Parameters" + :widths: 4, 15, 15, 30, 40 + + "``POST``","dhcpv4","service","reconfigure","" + "``POST``","dhcpv4","service","restart","" + "``POST``","dhcpv4","service","start","" + "``GET``","dhcpv4","service","status","" + "``POST``","dhcpv4","service","stop","" diff --git a/source/development/api/core/dhcpv6.rst b/source/development/api/core/dhcpv6.rst new file mode 100644 index 00000000..6d8f0cfd --- /dev/null +++ b/source/development/api/core/dhcpv6.rst @@ -0,0 +1,20 @@ +Dhcpv6 +~~~~~~ + +.. csv-table:: Resources (LeasesController.php) + :header: "Method", "Module", "Controller", "Command", "Parameters" + :widths: 4, 15, 15, 30, 40 + + "``POST``","dhcpv6","leases","delLease","$ip" + "``GET``","dhcpv6","leases","searchLease","" + "``GET``","dhcpv6","leases","searchPrefix","" + +.. csv-table:: Service (ServiceController.php) + :header: "Method", "Module", "Controller", "Command", "Parameters" + :widths: 4, 15, 15, 30, 40 + + "``POST``","dhcpv6","service","reconfigure","" + "``POST``","dhcpv6","service","restart","" + "``POST``","dhcpv6","service","start","" + "``GET``","dhcpv6","service","status","" + "``POST``","dhcpv6","service","stop","" diff --git a/source/development/api/core/interfaces.rst b/source/development/api/core/interfaces.rst index 30000461..3d58c606 100644 --- a/source/development/api/core/interfaces.rst +++ b/source/development/api/core/interfaces.rst @@ -1,6 +1,21 @@ Interfaces ~~~~~~~~~~ +.. csv-table:: Resources (LaggSettingsController.php) + :header: "Method", "Module", "Controller", "Command", "Parameters" + :widths: 4, 15, 15, 30, 40 + + "``POST``","interfaces","lagg_settings","addItem","" + "``POST``","interfaces","lagg_settings","delItem","$uuid" + "``GET``","interfaces","lagg_settings","get","" + "``GET``","interfaces","lagg_settings","getItem","$uuid=null" + "``POST``","interfaces","lagg_settings","reconfigure","" + "``*``","interfaces","lagg_settings","searchItem","" + "``POST``","interfaces","lagg_settings","set","" + "``POST``","interfaces","lagg_settings","setItem","$uuid" + + "``<>``", "", "", "", "*model* `Lagg.xml `__" + .. csv-table:: Resources (LoopbackSettingsController.php) :header: "Method", "Module", "Controller", "Command", "Parameters" :widths: 4, 15, 15, 30, 40 diff --git a/source/development/api/core/openvpn.rst b/source/development/api/core/openvpn.rst index 5c2f0997..de9e0d6f 100644 --- a/source/development/api/core/openvpn.rst +++ b/source/development/api/core/openvpn.rst @@ -34,7 +34,7 @@ Openvpn "``POST``","openvpn","instances","add","" "``POST``","openvpn","instances","addStaticKey","" "``POST``","openvpn","instances","del","$uuid" - "``GET``","openvpn","instances","delStaticKey","$uuid" + "``POST``","openvpn","instances","delStaticKey","$uuid" "``GET``","openvpn","instances","genKey","" "``GET``","openvpn","instances","get","$uuid=null" "``GET``","openvpn","instances","get","" diff --git a/source/development/api/core/unbound.rst b/source/development/api/core/unbound.rst index 5a459b43..61828531 100644 --- a/source/development/api/core/unbound.rst +++ b/source/development/api/core/unbound.rst @@ -16,7 +16,7 @@ Unbound :header: "Method", "Module", "Controller", "Command", "Parameters" :widths: 4, 15, 15, 30, 40 - "``GET``","unbound","overview","Rolling","$timeperiod,$clients=false" + "``GET``","unbound","overview","Rolling","$timeperiod,$clients='0'" "``GET``","unbound","overview","isBlockListEnabled","" "``GET``","unbound","overview","isEnabled","" "``GET``","unbound","overview","searchQueries","" diff --git a/source/development/api/plugins/quagga.rst b/source/development/api/plugins/quagga.rst index 9ed36a58..ab3c67bb 100644 --- a/source/development/api/plugins/quagga.rst +++ b/source/development/api/plugins/quagga.rst @@ -62,31 +62,22 @@ Quagga "``GET``","quagga","diagnostics","bfdcounters","" "``GET``","quagga","diagnostics","bfdneighbors","" "``GET``","quagga","diagnostics","bfdsummary","" - "``GET``","quagga","diagnostics","bgpneighbors","$format=""json""" - "``GET``","quagga","diagnostics","bgproute","$format=""json""" - "``GET``","quagga","diagnostics","bgproute4","$format=""json""" - "``GET``","quagga","diagnostics","bgproute6","$format=""json""" - "``GET``","quagga","diagnostics","bgpsummary","$format=""json""" - "``GET``","quagga","diagnostics","generalroute","$format=""json""" - "``GET``","quagga","diagnostics","generalroute4","$format=""json""" - "``GET``","quagga","diagnostics","generalroute6","$format=""json""" + "``GET``","quagga","diagnostics","bgpneighbors","" + "``GET``","quagga","diagnostics","bgpsummary","" "``GET``","quagga","diagnostics","generalrunningconfig","" - "``GET``","quagga","diagnostics","ospfdatabase","$format=""json""" - "``GET``","quagga","diagnostics","ospfinterface","$format=""json""" - "``GET``","quagga","diagnostics","ospfneighbor","$format=""json""" - "``GET``","quagga","diagnostics","ospfoverview","$format=""json""" - "``GET``","quagga","diagnostics","ospfroute","$format=""json""" - "``GET``","quagga","diagnostics","ospfv3database","$format=""json""" - "``GET``","quagga","diagnostics","ospfv3interface","$format=""json""" - "``GET``","quagga","diagnostics","ospfv3neighbor","$format=""json""" - "``GET``","quagga","diagnostics","ospfv3overview","$format=""json""" - "``GET``","quagga","diagnostics","ospfv3route","$format=""json""" + "``GET``","quagga","diagnostics","ospfdatabase","" + "``GET``","quagga","diagnostics","ospfinterface","" + "``GET``","quagga","diagnostics","ospfoverview","" + "``GET``","quagga","diagnostics","ospfv3interface","" + "``GET``","quagga","diagnostics","ospfv3overview","" "``GET``","quagga","diagnostics","searchBgproute4","" "``GET``","quagga","diagnostics","searchBgproute6","" "``GET``","quagga","diagnostics","searchGeneralroute4","" "``GET``","quagga","diagnostics","searchGeneralroute6","" "``GET``","quagga","diagnostics","searchOspfneighbor","" "``GET``","quagga","diagnostics","searchOspfroute","" + "``GET``","quagga","diagnostics","searchOspfv3database","" + "``GET``","quagga","diagnostics","searchOspfv3route","$format=""json""" .. csv-table:: Resources (GeneralController.php) :header: "Method", "Module", "Controller", "Command", "Parameters" diff --git a/source/development/api/plugins/wazuhagent.rst b/source/development/api/plugins/wazuhagent.rst new file mode 100644 index 00000000..9fc8ec48 --- /dev/null +++ b/source/development/api/plugins/wazuhagent.rst @@ -0,0 +1,23 @@ +Wazuhagent +~~~~~~~~~~ + +.. csv-table:: Service (ServiceController.php) + :header: "Method", "Module", "Controller", "Command", "Parameters" + :widths: 4, 15, 15, 30, 40 + + "``POST``","wazuhagent","service","reconfigure","" + "``POST``","wazuhagent","service","restart","" + "``POST``","wazuhagent","service","start","" + "``GET``","wazuhagent","service","status","" + "``POST``","wazuhagent","service","stop","" + + "``<>``", "", "", "", "*model* `WazuhAgent.xml `__" + +.. csv-table:: Service (SettingsController.php) + :header: "Method", "Module", "Controller", "Command", "Parameters" + :widths: 4, 15, 15, 30, 40 + + "``GET``","wazuhagent","settings","get","" + "``POST``","wazuhagent","settings","set","" + + "``<>``", "", "", "", "*model* `WazuhAgent.xml `__" diff --git a/source/development/api/plugins/wireguard.rst b/source/development/api/plugins/wireguard.rst index 0b52fd35..935ad1ca 100644 --- a/source/development/api/plugins/wireguard.rst +++ b/source/development/api/plugins/wireguard.rst @@ -1,6 +1,60 @@ Wireguard ~~~~~~~~~ +.. csv-table:: Resources (ClientController.php) + :header: "Method", "Module", "Controller", "Command", "Parameters" + :widths: 4, 15, 15, 30, 40 + + "``POST``","wireguard","client","addClient","" + "``POST``","wireguard","client","delClient","$uuid" + "``GET``","wireguard","client","get","" + "``GET``","wireguard","client","getClient","$uuid=null" + "``*``","wireguard","client","searchClient","" + "``POST``","wireguard","client","set","" + "``POST``","wireguard","client","setClient","$uuid" + "``POST``","wireguard","client","toggleClient","$uuid" + + "``<>``", "", "", "", "*model* `Client.xml `__" + +.. csv-table:: Service (GeneralController.php) + :header: "Method", "Module", "Controller", "Command", "Parameters" + :widths: 4, 15, 15, 30, 40 + + "``GET``","wireguard","general","get","" + "``GET``","wireguard","general","getStatus","" + "``POST``","wireguard","general","set","" + + "``<>``", "", "", "", "*model* `General.xml `__" + +.. csv-table:: Resources (ServerController.php) + :header: "Method", "Module", "Controller", "Command", "Parameters" + :widths: 4, 15, 15, 30, 40 + + "``POST``","wireguard","server","addServer","$uuid=null" + "``POST``","wireguard","server","delServer","$uuid" + "``GET``","wireguard","server","get","" + "``GET``","wireguard","server","getServer","$uuid=null" + "``*``","wireguard","server","searchServer","" + "``POST``","wireguard","server","set","" + "``POST``","wireguard","server","setServer","$uuid=null" + "``POST``","wireguard","server","toggleServer","$uuid" + + "``<>``", "", "", "", "*model* `Server.xml `__" + +.. csv-table:: Service (ServiceController.php) + :header: "Method", "Module", "Controller", "Command", "Parameters" + :widths: 4, 15, 15, 30, 40 + + "``POST``","wireguard","service","reconfigure","" + "``POST``","wireguard","service","restart","" + "``GET``","wireguard","service","showconf","" + "``GET``","wireguard","service","showhandshake","" + "``POST``","wireguard","service","start","" + "``GET``","wireguard","service","status","" + "``POST``","wireguard","service","stop","" + + "``<>``", "", "", "", "*model* `General.xml `__" + .. csv-table:: Resources (ClientController.php) :header: "Method", "Module", "Controller", "Command", "Parameters" :widths: 4, 15, 15, 30, 40 @@ -34,6 +88,7 @@ Wireguard "``POST``","wireguard","server","delServer","$uuid" "``GET``","wireguard","server","get","" "``GET``","wireguard","server","getServer","$uuid=null" + "``GET``","wireguard","server","keyPair","" "``*``","wireguard","server","searchServer","" "``POST``","wireguard","server","set","" "``POST``","wireguard","server","setServer","$uuid=null" @@ -45,8 +100,10 @@ Wireguard :header: "Method", "Module", "Controller", "Command", "Parameters" :widths: 4, 15, 15, 30, 40 + "``POST``","wireguard","service","reconfigure","" "``POST``","wireguard","service","reconfigure","" "``POST``","wireguard","service","restart","" + "``GET``","wireguard","service","show","" "``GET``","wireguard","service","showconf","" "``GET``","wireguard","service","showhandshake","" "``POST``","wireguard","service","start",""