OPNsense Forum

Archive => 19.7 Legacy Series => Topic started by: surat on January 28, 2020, 11:51:03 AM

Title: [help] API system_usermanager.php
Post by: surat on January 28, 2020, 11:51:03 AM
What is the API for create user on OPNsenseURL/system_usermanager.php?act=new ?? I didn't see it in the documentation https://docs.opnsense.org/development/api.html

Many thanks!
Title: Re: [help] API system_usermanager.php
Post by: fabian on January 28, 2020, 11:57:47 AM
There is no API for that. In general, look at the URL and if it contains /ui after the host, it is likely having an API behind. Many legacy pages are not migrated yet but some are and mostly all plugins as well.
Title: Re: [help] API system_usermanager.php
Post by: surat on January 28, 2020, 12:09:28 PM
is there a way to create users without OPNsense-WebGUI? I need to create users via curl or python for integrate with my internal Human Resource application. Is there any reference to do that?
Title: Re: [help] API system_usermanager.php
Post by: fabian on January 28, 2020, 01:28:37 PM
You can

... Port the page to MVC
... Use Selenium to automate a browser
... You can work in a script with the pages (example: https://github.com/fabianfrz/scripts/blob/master/OPNsense/backup_over_http.rb)
... Write a custom script which dies the same as the UI on OPNsense and updates your data periodically.