update API docs

This commit is contained in:
Ad Schellevis
2022-11-24 19:06:26 +01:00
parent 45e1b74f36
commit b337e4b85c
8 changed files with 57 additions and 5 deletions

View File

@@ -43,6 +43,7 @@ Diagnostics
:header: "Method", "Module", "Controller", "Command", "Parameters"
:widths: 4, 15, 15, 30, 40
"``POST``","diagnostics","interface","CarpStatus","$status"
"``POST``","diagnostics","interface","delRoute",""
"``POST``","diagnostics","interface","flushArp",""
"``GET``","diagnostics","interface","getArp",""
@@ -53,9 +54,13 @@ Diagnostics
"``GET``","diagnostics","interface","getMemoryStatistics",""
"``GET``","diagnostics","interface","getNdp",""
"``GET``","diagnostics","interface","getNetisrStatistics",""
"``GET``","diagnostics","interface","getPfSyncNodes",""
"``GET``","diagnostics","interface","getProtocolStatistics",""
"``GET``","diagnostics","interface","getRoutes",""
"``GET``","diagnostics","interface","getSocketStatistics",""
"``GET``","diagnostics","interface","getVipStatus",""
"``GET``","diagnostics","interface","searchArp",""
"``GET``","diagnostics","interface","searchNdp",""
.. csv-table:: Resources (LvtemplateController.php)
:header: "Method", "Module", "Controller", "Command", "Parameters"
@@ -108,6 +113,12 @@ Diagnostics
"``<<uses>>``", "", "", "", "*model* `PacketCapture.xml <https://github.com/opnsense/core/blob/master/src/opnsense/mvc/app/models/OPNsense/Diagnostics/PacketCapture.xml>`__"
.. csv-table:: Resources (SystemController.php)
:header: "Method", "Module", "Controller", "Command", "Parameters"
:widths: 4, 15, 15, 30, 40
"``GET``","diagnostics","system","memory",""
.. csv-table:: Resources (SystemhealthController.php)
:header: "Method", "Module", "Controller", "Command", "Parameters"
:widths: 4, 15, 15, 30, 40

View File

@@ -1,3 +1,5 @@
.. _api_core_firewall:
Firewall
~~~~~~~~
@@ -14,6 +16,7 @@ Firewall
"``GET``","firewall","alias","getItem","$uuid=null"
"``GET``","firewall","alias","getTableSize",""
"``POST``","firewall","alias","import",""
"``GET``","firewall","alias","listCategories",""
"``GET``","firewall","alias","listCountries",""
"``GET``","firewall","alias","listNetworkAliases",""
"``POST``","firewall","alias","reconfigure",""
@@ -56,3 +59,9 @@ Firewall
:widths: 4, 15, 15, 30, 40
"``GET``","firewall","filter_util","ruleStats",""
.. Tip::
In order to inject rules using an API, you may take a look at the :ref:`Firewall Plugin API <api_plugins_firewall>`,
currently the core system does not support rule modifications via the API for this topic.

View File

@@ -19,4 +19,4 @@
.. Tip::
In order to inject rules using an API, you may take a look at the :ref:`Firewall Plugin API <api_plugins_firewall>`,
currently the core system does not support rule modifications via the api for this topic.
currently the core system does not support rule modifications via the API for this topic.

View File

@@ -16,6 +16,22 @@ Interfaces
"``<<uses>>``", "", "", "", "*model* `Loopback.xml <https://github.com/opnsense/core/blob/master/src/opnsense/mvc/app/models/OPNsense/Interfaces/Loopback.xml>`__"
.. csv-table:: Resources (VipSettingsController.php)
:header: "Method", "Module", "Controller", "Command", "Parameters"
:widths: 4, 15, 15, 30, 40
"``POST``","interfaces","vip_settings","addItem",""
"``POST``","interfaces","vip_settings","delItem","$uuid"
"``GET``","interfaces","vip_settings","get",""
"``GET``","interfaces","vip_settings","getItem","$uuid=null"
"``GET``","interfaces","vip_settings","getUnusedVhid",""
"``POST``","interfaces","vip_settings","reconfigure",""
"``*``","interfaces","vip_settings","searchItem",""
"``POST``","interfaces","vip_settings","set",""
"``POST``","interfaces","vip_settings","setItem","$uuid"
"``<<uses>>``", "", "", "", "*model* `Vip.xml <https://github.com/opnsense/core/blob/master/src/opnsense/mvc/app/models/OPNsense/Interfaces/Vip.xml>`__"
.. csv-table:: Resources (VlanSettingsController.php)
:header: "Method", "Module", "Controller", "Command", "Parameters"
:widths: 4, 15, 15, 30, 40

View File

@@ -1,9 +1,19 @@
.. _api_plugins_firewall:
Firewall
~~~~~~~~
The firewall API plugin is a first step into migrating the legacy firewall components from OPNsense, although it does contain
a user interface, it's main focus is only to provide machine to machine interaction between custom applications and OPNsense
for selected features.
The firewall API plugin (**os-firewall**) offers a way for machine to machine interaction between custom applications and OPNsense, it can
easily be installed like any other plugin via :menuselection:`System --> Firmware --> Plugins`.
Although the plugin does contains a basic user interface (in :menuselection:`Firewall --> Automation`), it's mirely intended
as a reference and testbed. There's no relation to any of the rules being managed via the core system.
.. Tip::
Use your browsers "inspect" feature to compare requests easily, the user interface in terms of communication is exactly the same
as offered by the API . Rules not visible in the web interface (:menuselection:`Firewall --> Automation`) will not be returned by the API either.
.. csv-table:: Abstract [non-callable] (FilterBaseController.php)

View File

@@ -12,7 +12,7 @@ as a reference and testbed. There's no relation to any of the rules being manage
.. Tip::
Use your browsers "inspect" feature to compare requests easily, the user interface in terms of communication is exactly the same
as offered by the API . Rules not visible in the web interface will not be returned by the API either.
as offered by the API . Rules not visible in the web interface (:menuselection:`Firewall --> Automation`) will not be returned by the API either.
{% for controller in controllers %}

View File

@@ -51,6 +51,7 @@ Haproxy
"``POST``","haproxy","settings","addBackend",""
"``POST``","haproxy","settings","addCpu",""
"``POST``","haproxy","settings","addErrorfile",""
"``POST``","haproxy","settings","addFcgi",""
"``POST``","haproxy","settings","addFrontend",""
"``POST``","haproxy","settings","addGroup",""
"``POST``","haproxy","settings","addHealthcheck",""
@@ -65,6 +66,7 @@ Haproxy
"``POST``","haproxy","settings","delBackend","$uuid"
"``POST``","haproxy","settings","delCpu","$uuid"
"``POST``","haproxy","settings","delErrorfile","$uuid"
"``POST``","haproxy","settings","delFcgi","$uuid"
"``POST``","haproxy","settings","delFrontend","$uuid"
"``POST``","haproxy","settings","delGroup","$uuid"
"``POST``","haproxy","settings","delHealthcheck","$uuid"
@@ -80,6 +82,7 @@ Haproxy
"``GET``","haproxy","settings","getBackend","$uuid=null"
"``GET``","haproxy","settings","getCpu","$uuid=null"
"``GET``","haproxy","settings","getErrorfile","$uuid=null"
"``GET``","haproxy","settings","getFcgi","$uuid=null"
"``GET``","haproxy","settings","getFrontend","$uuid=null"
"``GET``","haproxy","settings","getGroup","$uuid=null"
"``GET``","haproxy","settings","getHealthcheck","$uuid=null"
@@ -94,6 +97,7 @@ Haproxy
"``*``","haproxy","settings","searchBackends",""
"``*``","haproxy","settings","searchCpus",""
"``*``","haproxy","settings","searchErrorfiles",""
"``*``","haproxy","settings","searchFcgis",""
"``*``","haproxy","settings","searchFrontends",""
"``*``","haproxy","settings","searchGroups",""
"``*``","haproxy","settings","searchHealthchecks",""
@@ -109,6 +113,7 @@ Haproxy
"``POST``","haproxy","settings","setBackend","$uuid"
"``POST``","haproxy","settings","setCpu","$uuid"
"``POST``","haproxy","settings","setErrorfile","$uuid"
"``POST``","haproxy","settings","setFcgi","$uuid"
"``POST``","haproxy","settings","setFrontend","$uuid"
"``POST``","haproxy","settings","setGroup","$uuid"
"``POST``","haproxy","settings","setHealthcheck","$uuid"

View File

@@ -21,6 +21,7 @@ Wireguard
:widths: 4, 15, 15, 30, 40
"``GET``","wireguard","general","get",""
"``GET``","wireguard","general","getStatus",""
"``POST``","wireguard","general","set",""
"``<<uses>>``", "", "", "", "*model* `General.xml <https://github.com/opnsense/plugins/blob/master/net/wireguard/src/opnsense/mvc/app/models/OPNsense/Wireguard/General.xml>`__"