https://github.com/ndejong/pfsense_fauxapi_client_bash
Bash client for pfSense-FauxAPI
https://github.com/ndejong/pfsense_fauxapi_client_bash
pfsense pfsense-fauxapi
Last synced: about 1 year ago
JSON representation
Bash client for pfSense-FauxAPI
- Host: GitHub
- URL: https://github.com/ndejong/pfsense_fauxapi_client_bash
- Owner: ndejong
- Created: 2019-03-16T05:20:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-18T07:26:26.000Z (almost 6 years ago)
- Last Synced: 2025-02-10T06:14:18.939Z (over 1 year ago)
- Topics: pfsense, pfsense-fauxapi
- Language: Shell
- Homepage: https://github.com/ndejong/pfsense_fauxapi
- Size: 3.91 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PfsenseFauxapi - Shell Interface
A shell client for pfSense-FauxAPI - https://github.com/ndejong/pfsense_fauxapi
### Example
```bash
# import fauxapi client functions from pfsense-fauxapi.sh
source "sources/pfsense-fauxapi.sh"
# setup some variables
fauxapi_host=""
fauxapi_apikey=""
fauxapi_apisecret=""
# generate an auth token to use
export fauxapi_auth=$(fauxapi_auth ${fauxapi_apikey} ${fauxapi_apisecret})
# make a pfSnese-FauxAPI call, in this example get the system configuration
system_config=$(fauxapi_config_get ${fauxapi_host})
# output in JSON pretty print using jq
echo "${system_config}" | jq .
```
It is recommended to review the commented out samples in the provided
`fauxapi-sample.sh` file that cover all possible FauxAPI calls to gain a better
idea on usage.