Skip to content

Commit bd5be8c

Browse files
Added missing README.md file
1 parent c8c04cd commit bd5be8c

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
pfSense API
2+
===========
3+
# Introduction
4+
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+
6+
# Installation
7+
To install pfSense API, simply run the following command from the pfSense shell:<br>
8+
`pkg add https://github.com/jaredhendrickson13/pfsense-api/releases/v0.0.1/pfSense-pkg-API-0.0_1.txz`<br>
9+
10+
To uninstall, run the following command:<br>
11+
`pkg delete pfSense-pkg-API`<br>
12+
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_
14+
15+
# Requirements
16+
- pfSense 2.4.4 or later is required
17+
- 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
19+
20+
# Authentication
21+
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+
23+
# Response Codes
24+
`200 (OK)` : API call succeeded<br>
25+
`400 (Bad Request)` : There was an error with your requested parameters<br>
26+
`401 (Unauthorized)` : API client has not completed authentiation or authorization successfully<br>
27+
`403 (Forbidden)` : The API endpoint has refused your call<br>
28+
`404 (Not found)` : Either the API endpoint or requested data was not found<br>
29+
`500 (Server error)` : The API endpoint encountered an unexpected error processing your API request<br>
30+
31+
# Rate limit
32+
There is no limit to API calls at this time

0 commit comments

Comments
 (0)