pfsense-api icon indicating copy to clipboard operation
pfsense-api copied to clipboard

API for captive portal status

Open ghost opened this issue 5 years ago • 6 comments

Can you add an end point to get captive portal status. Thank you.

ghost avatar Jan 19 '21 15:01 ghost

Hey!

Thanks for the request. I'll do some research and see what this would take. I'll provide an update when I've had a chance to take a look.

Thanks again!

jaredhendrickson13 avatar Jan 29 '21 20:01 jaredhendrickson13

Can you point me to resources where I can learn and start building stuff like these myself. Thank you.

ghost avatar Jan 30 '21 14:01 ghost

You can refer to the contributors guide to learn the framework and start building your own API endpoints. You may also use the existing code as reference for your code.

It helps to have a good understanding of the pfSense code, PHP, and FreeBSD 11/12. You can refer to these documents:

  • https://www.php.net/manual/en/
  • https://github.com/pfsense
  • https://docs.freebsd.org/en/books/handbook/

If you plan on merging your code into this project, you should also have a good understanding of Python3 to write unit tests as well as REST architecture:

  • https://docs.python.org/3.8/
  • https://restfulapi.net

jaredhendrickson13 avatar Jan 30 '21 18:01 jaredhendrickson13

Will this include Vouchers and allowed mac and ip?

tjsas1 avatar Mar 29 '21 06:03 tjsas1

@tjsas1 the work I have staged for this particular feature will only include data found under Status > Captive Portal within the UI. I believe the data you are referring to is found under Services > Captive Portal, which would need to be factored into a separate endpoint. If that is a desired feature, feel free to open a feature request and I'll see what I can do.

jaredhendrickson13 avatar Mar 31 '21 22:03 jaredhendrickson13