From 347cc30415675cd287b0fbe4b4124cb25d9a536f Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:56:32 -0700 Subject: [PATCH] Correct api key docs for pfsense v1 vs v2 --- docs/widgets/services/pfsense.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/widgets/services/pfsense.md b/docs/widgets/services/pfsense.md index f601295a6..ad5b40ee9 100644 --- a/docs/widgets/services/pfsense.md +++ b/docs/widgets/services/pfsense.md @@ -9,7 +9,7 @@ This widget requires the installation of the [pfsense-api](https://github.com/ja Once pfSense API is installed, you can set the API to be read-only in System > API > Settings. -There are two currently supported authentication modes: 'Local Database' and 'API Key'. For 'Local Database', use `username` and `password` with the credentials of an admin user. For 'API Key', utilize the `headers` parameter with the `X-API-Key` header name and `key` value obtained from pfSense as shown below. Do not use both headers and username / password. +There are two currently supported authentication modes: 'Local Database' and 'API Key' (v2) / 'API Token' (v1). For 'Local Database', use `username` and `password` with the credentials of an admin user. The specifics of using the API key / token depend on the version of the pfSense API, see the config examples below. Do not use both headers and username / password. The interface to monitor is defined by updating the `wan` parameter. It should be referenced as it is shown under Interfaces > Assignments in pfSense. @@ -17,6 +17,8 @@ Load is returned instead of cpu utilization. This is a limitation in the pfSense Allowed fields: `["load", "memory", "temp", "wanStatus", "wanIP", "disk"]` (maximum of 4) +For version 2: + ```yaml widget: type: pfsense @@ -29,3 +31,11 @@ widget: version: 2 # optional, defaults to 1 for api v1 fields: ["load", "memory", "temp", "wanStatus"] # optional ``` + +For version 1: + +```yaml +headers: # optional, or username/password + Authorization: client_id client_token # obtained from pfSense API +version: 1 +```