Is there a CMD_API_ADMIN_SETTINGS?

kristian

Verified User
Joined
Nov 4, 2005
Messages
436
Location
Norway
Hi,

In my automation attempts, I am in need of changing some values in the CMD_ADMIN_SETTINGS page, but it doesn't look like a CMD_API_ADMIN_SETTINGS endpoint exists. When I try to access it in a browser while being logged in as 'admin', I get this message:

Code:
error=1&text=You%20cannot%20execute%20that%20command&details=The%20request%20you%27ve%20made%20cannot%20be%20executed%20because%20it%20does%20not%20exist%20in%20your%20authority%20level

Am I missing something? If an API endpoint for this page doesn't exist, is there a plan to add support for it?

Is there a different way I could automate these settings, e.g. by changing the content of a file or in a database or something like that?
 
Thanks for that, I decided against it however, due to the need of supplying all variables. However, I noticed when changing some of these settings, that the `directadmin.conf` file was modified, reflecting the selections I made. I guess my question now is - is that all that is changed? Because if so, I can modify the `directadmin.conf` file directly, which is much easier to do with Ansible. If any other files or parts of the system is touched/modified in addition to the settings in `directadmin.conf` though, then it gets complicated again.
 
Well, it depends on which settings you want to change. The page CMD_API_ADMIN_SETTINGS allows to change settings in directadmin.conf, and still some other settings which are not stored in the file. And the file contain much more settings then Directadmin allows to change via CMD_API_ADMIN_SETTINGS. So you can easily track it down one by one: edit option in GUI and see whether or not directadmin.conf changed.


For example:

- disable/enable RBL (DNSBL)
- sending limits

are not included into directadmin.conf, probably there are some more.
 
Yeah, I guess there's time for some testing. It would be nice if those settings were all documented somewhere, specially when there's no API for changing them. If a setting either *only* changes `directadmin.conf`, or not at all, then I could easily find the ones I can manipulate that file for, but I still don't know if there has been changes elsewhere as well.

Looking for changes everywhere on a server to track down how the Admin Settings page work shouldn't be necessary. :(
 
Back
Top