You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,4 @@
1
-
pfSense API
2
-
===========
1
+
---
3
2
# Introduction
4
3
pfSense API is a fast, safe, full-fledged API based on REST architecture. This works by leveraging the same PHP functions and processes used by pfSense's webConfigurator into API endpoints to create, read, update and delete pfSense configurations. All API endpoints enforce input validation to prevent invalid configurations from being made. Configurations made via API are properly written to the master XML configuration and the correct backend configurations are made preventing the need for a reboot. All this results in the fastest, safest, and easiest way to automate pfSense!
5
4
@@ -10,21 +9,21 @@ To install pfSense API, simply run the following command from the pfSense shell:
10
9
To uninstall, run the following command:<br>
11
10
`pkg delete pfSense-pkg-API`<br>
12
11
13
-
_Note: if you do not shell access to pfSense, you can install via the webConfigurator by navigating to 'Diagnostics > Command Prompt' and enter the commands there_
12
+
_Note: if you do not have shell access to pfSense, you can still install via the webConfigurator by navigating to 'Diagnostics > Command Prompt' and enter the commands there_
14
13
15
14
# Requirements
16
-
- pfSense 2.4.4 or later is required
15
+
- pfSense 2.4.4 or later is supported
17
16
- pfSense API requires a local user account in pfSense. The same permissions required to make configurations in the webConfigurator are required to make calls to the API endpoints
18
-
- While not an enforced requirement, it is STRONGLY recommended that you configure pfSense to use HTTPS instead of HTTP
17
+
- While not an enforced requirement, it is STRONGLY recommended that you configure pfSense to use HTTPS instead of HTTP. This ensures that login credentials and/or API tokens remain secure in-transit
19
18
20
19
# Authentication
21
20
By default, pfSense API uses the same credentials as the webConfigurator. Alternatively, you can configure pfSense API to create secure API client IDs and tokens for API users. To generate, or delete API keys you can navigate to `System > API` in the UI after installation, and change the authentication mode to `API Token`.
22
21
23
22
# Response Codes
24
23
`200 (OK)` : API call succeeded<br>
25
-
`400 (Bad Request)` : There was an error with your requested parameters<br>
24
+
`400 (Bad Request)` : An error was found within your requested parameters<br>
26
25
`401 (Unauthorized)` : API client has not completed authentiation or authorization successfully<br>
27
-
`403 (Forbidden)` : The API endpoint has refused your call<br>
26
+
`403 (Forbidden)` : The API endpoint has refused your call. Commonly due to your access settings found in `System > API`<br>
28
27
`404 (Not found)` : Either the API endpoint or requested data was not found<br>
29
28
`500 (Server error)` : The API endpoint encountered an unexpected error processing your API request<br>
0 commit comments