Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

« Vorherige Version anzeigen Version 4 Aktuelle »




The required parameters of the API for UF Add-ins can be read out as follows:

  1. Log in to the web interface of the LANCOM R&S Unified Firewall.
  2. Open the Developer Tools in your browser (usually F12) and switch to the Network tab.
  3. Perform desired configuration locally and record it in Dev-Tools.
  4. Copy payload from request with status 201.

API for UF Add-ins

Including the API as a variable to simplify calls to the following methods.

var ufApi = config.getUfApi();

LANCOM R&S Unified Firewall configurations consist of entities and singletons.

  • Entities: Entities are configurations where multiple entries can be made (e.g. network-connections).

  • Singletons: A singleton is a configuration that exists only once in the Unfied firewall (e.g. device name).

Methods of the API for UF Add-ins

ufAPI.raw: Raw API Requests are the general way how the API for UF Add-ins can be addressed. Various methods can be used to create, edit and delete configurations. Furthermore, it is possible to query configuration values.

  • ExampleufAPI.raw({ method: PUT|POST|GET|DELETE , uri: URI, body: { key: value, key: value, key: value }, failOnError: true|false })

Auxiliary methods:

The following methods simplify RAW requests:

ufAPI.lookup/ufAPI.lookupField: Various requests require the query of a UUID or a name field in the firewall configuration.

  • The ufAPI.lookup method can be used to retrieve the UUID for required parameters (for example, Ethernet interfaces).
    • ExampleufAPI.lookup("Entity", { key: value });
  • Parameters that do not have a UUID (e.g. routing table) are queried with the ufAPI.lookup.Field method.
    • Example: ufAPI.lookupField("Singleton", { key: value });

ufAPI.createObject: The ufAPI.createObject method is used to configure entities (e.g. network connections).

    • ExampleufAPI.createObject("Entity", { key: value, key: value, key: value });

ufAPI.modifyObject/ufAPI.modifySettings:

  • The ufAPI.modifyObject method can be used to edit configurations of entities (e.g. network connections).
    • ExampleufAPI.modifyObject("Entity", ufAPI.lookup, { key: value, key: value, key: value })
  • To customize singletons (e.g. firewall device name), the ufAPI.ModifySettings method is used.
    • ExampleufAPI.modifySettings("Singleton", { key: value });

  • Keine Stichwörter