Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a new control parameter that would allow a PATCH request to append the submitted array values to the existing array instead of replacing it #511

Closed
1hamidreza opened this issue Jul 16, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@1hamidreza
Copy link

Is your feature request related to existing pfSense functionality that is missing from the API? Please describe.
There was some endpoints available in the v1 API which we could add an entry to the current available array values such as firewall Alias. This seems to be not available in v2 API.

Is your feature request related to a problem? Please describe.
There are many cases which we need to trigger firewall via an external application (such as fail2ban) to add an entry to firewall alias or other array values.

Describe the solution you'd like
Adding a new control parameter that would allow a PATCH request to append the submitted array values to the existing array instead of replacing it.

Describe alternatives you've considered
As of now, to add new alias address entries, you can follow these steps:

Perform a GET request to retrieve the current values of your alias.
In your code, take the address array obtained from the GET request and append your new value(s).
Submit a PATCH request to update the array with all the values.

@1hamidreza 1hamidreza added backlog Issues backlogged for inclusion in future releases feature request New feature or request labels Jul 16, 2024
@jaredhendrickson13 jaredhendrickson13 removed the backlog Issues backlogged for inclusion in future releases label Jul 16, 2024
@jaredhendrickson13 jaredhendrickson13 moved this from Ready to In progress in pfSense REST API v2.1.0 Jul 17, 2024
jaredhendrickson13 added a commit that referenced this issue Jul 18, 2024
This control parameter allows you to append new items to an existing array field for Model updates instead of the default behavior of replacing the array with the new items.
@jaredhendrickson13 jaredhendrickson13 moved this from In progress to Done in pfSense REST API v2.1.0 Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants