Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# pfSense REST API Package

[![Build](https://github.com/jaredhendrickson13/pfsense-api/actions/workflows/build.yml/badge.svg)](https://github.com/jaredhendrickson13/pfsense-api/actions/workflows/build.yml)
[![Quality](https://github.com/jaredhendrickson13/pfsense-api/actions/workflows/quality.yml/badge.svg)](https://github.com/jaredhendrickson13/pfsense-api/actions/workflows/quality.yml)
[![Release](https://github.com/jaredhendrickson13/pfsense-api/actions/workflows/release.yml/badge.svg)](https://github.com/jaredhendrickson13/pfsense-api/actions/workflows/release.yml)<br>
![Downloads](https://img.shields.io/github/downloads/jaredhendrickson13/pfsense-api/total?label=Downloads)
![License](https://img.shields.io/github/license/jaredhendrickson13/pfsense-api?label=License)
[![Build](https://github.com/pfrest/pfSense-pkg-RESTAPI/actions/workflows/build.yml/badge.svg)](https://github.com/pfrest/pfSense-pkg-RESTAPI/actions/workflows/build.yml)
[![Quality](https://github.com/pfrest/pfSense-pkg-RESTAPI/actions/workflows/quality.yml/badge.svg)](https://github.com/pfrest/pfSense-pkg-RESTAPI/actions/workflows/quality.yml)
[![Release](https://github.com/pfrest/pfSense-pkg-RESTAPI/actions/workflows/release.yml/badge.svg)](https://github.com/pfrest/pfSense-pkg-RESTAPI/actions/workflows/release.yml)<br>
![Downloads](https://img.shields.io/github/downloads/pfrest/pfSense-pkg-RESTAPI/total?label=Downloads)
![License](https://img.shields.io/github/license/pfrest/pfSense-pkg-RESTAPI?label=License)
![Docs](https://img.shields.io/website?url=https%3A%2F%2Fpfrest.org&label=Documentation)

The pfSense REST API package is an unofficial, open-source REST and GraphQL API for pfSense CE and pfSense Plus
Expand Down Expand Up @@ -36,13 +36,13 @@ commands are included below for quick reference.
Install on pfSense CE:

```bash
pkg-static add https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-2.8.1-pkg-RESTAPI.pkg
pkg-static add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-2.8.1-pkg-RESTAPI.pkg
```

Install on pfSense Plus:

```bash
pkg-static -C /dev/null add https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-25.11-pkg-RESTAPI.pkg
pkg-static -C /dev/null add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-25.11-pkg-RESTAPI.pkg
```

> [!WARNING]
Expand All @@ -51,7 +51,7 @@ pkg-static -C /dev/null add https://github.com/jaredhendrickson13/pfsense-api/re

> [!TIP]
> You may need to customize the installation command to reference the package built for your pfSense version. Check
> the [releases page](https://github.com/jaredhendrickson13/pfsense-api/releases) to find the package built for
> the [releases page](https://github.com/pfrest/pfSense-pkg-RESTAPI/releases) to find the package built for
> your version of pfSense.

## Disclaimers
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ including but not limited to:
- Bug fixes
- New features
- Documentation improvements
- Reporting and collaborating to open [issues](https://github.com/jaredhendrickson13/pfsense-api/issues)
- Opening and contributing to [discussions](https://github.com/jaredhendrickson13/pfsense-api/discussions)
- Reporting and collaborating to open [issues](https://github.com/pfrest/pfSense-pkg-RESTAPI/issues)
- Opening and contributing to [discussions](https://github.com/pfrest/pfSense-pkg-RESTAPI/discussions)

To make a code contribution, please follow these steps:

1. Fork the repository on [GitHub](https://github.com/jaredhendrickson13/pfsense-api).
1. Fork the repository on [GitHub](https://github.com/pfrest/pfSense-pkg-RESTAPI).
2. Clone your fork locally and make your changes.
3. Commit your changes and push them to your fork.
4. Open a pull request on the main repository to merge your changes into the project.
Expand Down Expand Up @@ -174,7 +174,7 @@ These tools will allow you to create a FreeBSD virtual machine for building the
Clone the repository to your development machine:

```bash
git clone git@github.com:jaredhendrickson13/pfsense-api.git
git clone git@github.com:pfrest/pfSense-pkg-RESTAPI.git
```

#### Step 3: Run the vagrant-build.sh script
Expand Down
8 changes: 4 additions & 4 deletions docs/INSTALL_AND_CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ run pfSense. It's recommended to follow Netgate's [minimum hardware requirements

!!! Tip
Don't see your version of pfSense listed? Older versions of pfSense may be supported by older versions of this package.
Check the [releases page](https://github.com/jaredhendrickson13/pfsense-api/releases).
Check the [releases page](https://github.com/pfrest/pfSense-pkg-RESTAPI/releases).

## Installing the package

Expand All @@ -36,18 +36,18 @@ The pfSense REST API package is built just like any other pfSense package and ca
**Install on pfSense CE**

```bash
pkg-static add https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-2.8.1-pkg-RESTAPI.pkg
pkg-static add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-2.8.1-pkg-RESTAPI.pkg
```

**Install on pfSense Plus**

```bash
pkg-static -C /dev/null add https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-25.11-pkg-RESTAPI.pkg
pkg-static -C /dev/null add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-25.11-pkg-RESTAPI.pkg
```

!!! Important
- You may need to customize the installation command to reference the package built for your pfSense version. Check
the [releases page](https://github.com/jaredhendrickson13/pfsense-api/releases) to find the package built for
the [releases page](https://github.com/pfrest/pfSense-pkg-RESTAPI/releases) to find the package built for
your version of pfSense.
- When updating pfSense, **you must reinstall this package afterward** as pfSense removes unofficial packages during
system updates and has no way to automatically reinstall them.
Expand Down
12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ API package and provide you with the information you need to configure and use t

!!! Note
These docs are only applicable to the REST API v2 package and later. If you are using the legacy v1 package, please
refer to the docs on the [legacy branch](https://github.com/jaredhendrickson13/pfsense-api/tree/legacy).
refer to the docs on the [legacy branch](https://github.com/pfrest/pfSense-pkg-RESTAPI/tree/legacy).

## Key Features

Expand All @@ -25,12 +25,12 @@ API package and provide you with the information you need to configure and use t
- Built-in Swagger documentation

New features are constantly being added. If you have a feature request, please open an issue on the project's [GitHub
repository](https://github.com/jaredhendrickson13/pfsense-api/issues/new?labels=backlog%2C+feature+request&projects=&template=feature-request.md).
repository](https://github.com/pfrest/pfSense-pkg-RESTAPI/issues/new?labels=backlog%2C+feature+request&projects=&template=feature-request.md).

## Source Code & Contributions

The source code for this project is available in its entirety on [GitHub](https://github.com/jaredhendrickson13/pfsense-api)
and is licensed under an [Apache 2.0 license](https://github.com/jaredhendrickson13/pfsense-api/blob/master/LICENSE).
The source code for this project is available in its entirety on [GitHub](https://github.com/pfrest/pfSense-pkg-RESTAPI)
and is licensed under an [Apache 2.0 license](https://github.com/pfrest/pfSense-pkg-RESTAPI/blob/master/LICENSE).
Contributions are welcome and encouraged. If you would like to contribute to the project, please read through the
[contribution guidelines](CONTRIBUTING.md) before
opening a pull request.
Expand All @@ -41,8 +41,8 @@ opening a pull request.

!!! Important
Unless your inquiry is regarding a [security vulnerability](SECURITY.md) or other sensitive matter, please do not
contact the maintainers directly. Instead, please [open an issue](https://github.com/jaredhendrickson13/pfsense-api/issues/new/choose) to report a bug or request a feature. For
general questions or help requests, please [open a discussion](https://github.com/jaredhendrickson13/pfsense-api/discussions/new/choose).
contact the maintainers directly. Instead, please [open an issue](https://github.com/pfrest/pfSense-pkg-RESTAPI/issues/new/choose) to report a bug or request a feature. For
general questions or help requests, please [open a discussion](https://github.com/pfrest/pfSense-pkg-RESTAPI/discussions/new/choose).

## Disclaimers

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
site_name: pfSense REST API Guide
repo_url: https://github.com/jaredhendrickson13/pfsense-api
repo_url: https://github.com/pfrest/pfSense-pkg-RESTAPI
nav:
- General:
- Home: index.md
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use RESTAPI\Models\RESTAPIVersion;
* runs on a schedule to periodically update the releases cache in the background.
*/
class RESTAPIVersionReleasesCache extends Cache {
const RELEASES_URL = 'https://api.github.com/repos/jaredhendrickson13/pfsense-api/releases';
const RELEASES_URL = 'https://api.github.com/repos/pfrest/pfSense-pkg-RESTAPI/releases';

public int $timeout = 30;
public string $schedule = '0 * * * *';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SystemRESTAPISettingsForm extends Form {
'report_an_issue' => [
'title' => 'Report an Issue',
'icon' => 'fa-solid fa-question-circle',
'link' => 'https://github.com/jaredhendrickson13/pfsense-api/issues/new/choose',
'link' => 'https://github.com/pfrest/pfSense-pkg-RESTAPI/issues/new/choose',
'classes' => ['btn-info'],
],
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class FreeRADIUSClient extends Model {
if (!empty($input_errors)) {
throw new ValidationError(
message: "An unexpected validation error has occurred: $input_errors[0]. Please report this issue at " .
'https://github.com/jaredhendrickson13/pfsense-api/issues/new',
'https://github.com/pfrest/pfSense-pkg-RESTAPI/issues/new',
response_id: 'FREERADIUS_CLIENTS_UNEXPECTED_VALIDATION_ERROR',
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class FreeRADIUSInterface extends Model {
if (!empty($input_errors)) {
throw new ValidationError(
message: "An unexpected validation error has occurred: $input_errors[0]. Please report this issue at " .
'https://github.com/jaredhendrickson13/pfsense-api/issues/new',
'https://github.com/pfrest/pfSense-pkg-RESTAPI/issues/new',
response_id: 'FREERADIUS_INTERFACE_UNEXPECTED_VALIDATION_ERROR',
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class FreeRADIUSUser extends Model {
if (!empty($input_errors)) {
throw new ValidationError(
message: "An unexpected validation error has occurred: $input_errors[0]. Please report this issue at " .
'https://github.com/jaredhendrickson13/pfsense-api/issues/new',
'https://github.com/pfrest/pfSense-pkg-RESTAPI/issues/new',
response_id: 'FREERADIUS_USER_UNEXPECTED_VALIDATION_ERROR',
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use RESTAPI\Responses\ServerError;
* Defines a Model that represents the REST API version installed on this system.
*/
class RESTAPIVersion extends Model {
const REPO_URL = 'https://github.com/jaredhendrickson13/pfsense-api';
const REPO_URL = 'https://github.com/pfrest/pfSense-pkg-RESTAPI';

public StringField $current_version;
public StringField $latest_version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ class OpenAPISchema extends Schema {
'version' => $restapi_version->current_version->value,
'contact' => [
'name' => 'GitHub',
'url' => 'https://github.com/jaredhendrickson13/pfsense-api',
'url' => 'https://github.com/pfrest/pfSense-pkg-RESTAPI',
],
'license' => [
'name' => 'Apache 2.0',
'url' => 'https://raw.githubusercontent.com/jaredhendrickson13/pfsense-api/master/LICENSE',
'url' => 'https://raw.githubusercontent.com/pfrest/pfSense-pkg-RESTAPI/master/LICENSE',
],
'description' =>
'### Getting Started' .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<name>RESTAPI</name>
<internal_name>restapi</internal_name>
<descr><![CDATA[The missing REST API package for pfSense]]></descr>
<website>https://github.com/jaredhendrickson13/pfsense-api</website>
<website>https://github.com/pfrest/pfSense-pkg-RESTAPI</website>
<category>System</category>
<version>%%PKGVERSION%%</version>
<configurationfile>restapi.xml</configurationfile>
Expand Down
4 changes: 2 additions & 2 deletions tools/make_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import jinja2

# Constants
REPO_OWNER = "jaredhendrickson13"
REPO_NAME = "pfsense-api"
REPO_OWNER = "pfrest"
REPO_NAME = "pfSense-pkg-RESTAPI"
PKG_NAME = "pfSense-pkg-RESTAPI"


Expand Down
10 changes: 5 additions & 5 deletions vagrant-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ SSH_CONFIG_FILE=$(mktemp)
vagrant ssh-config > "$SSH_CONFIG_FILE"

# Copy the source code to the vagrant box using SCP (vagrant upload skips hidden files)
rsync -avz --progress -e "ssh -F $SSH_CONFIG_FILE" ../pfsense-api vagrant@default:/home/vagrant/build/ --exclude node_modules --exclude .git --exclude .phpdoc --exclude ./vendor --exclude .vagrant
rsync -avz --progress -e "ssh -F $SSH_CONFIG_FILE" ../pfSense-pkg-RESTAPI vagrant@default:/home/vagrant/build/ --exclude node_modules --exclude .git --exclude .phpdoc --exclude ./vendor --exclude .vagrant

# Run the build script on the vagrant box
cat << END | vagrant ssh
composer install --working-dir /home/vagrant/build/pfsense-api
cp -r /home/vagrant/build/pfsense-api/vendor/* /home/vagrant/build/pfsense-api/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/.resources/vendor/
python3.11 /home/vagrant/build/pfsense-api/tools/make_package.py -t $BUILD_VERSION
composer install --working-dir /home/vagrant/build/pfSense-pkg-RESTAPI
cp -r /home/vagrant/build/pfSense-pkg-RESTAPI/vendor/* /home/vagrant/build/pfSense-pkg-RESTAPI/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/.resources/vendor/
python3.11 /home/vagrant/build/pfSense-pkg-RESTAPI/tools/make_package.py -t $BUILD_VERSION
END

# Copy the built package back to the host using SCP
scp -F $SSH_CONFIG_FILE vagrant@default:/home/vagrant/build/pfsense-api/pfSense-pkg-RESTAPI/work/pkg/pfSense-pkg-RESTAPI-$BUILD_VERSION.pkg .
scp -F $SSH_CONFIG_FILE vagrant@default:/home/vagrant/build/pfSense-pkg-RESTAPI/pfSense-pkg-RESTAPI/work/pkg/pfSense-pkg-RESTAPI-$BUILD_VERSION.pkg .
rm $SSH_CONFIG_FILE