I am building a backend logic using nest.js, so I created a site via api called admin_add_site function.
Now I want to configure bandwidth with threshold, units and rollover, but I can’t find any apis to configure these values with my custom value.
When creating a site, threshold, units and rollover values set as default.
Here is an api document link.
All Appliance Administrator methods are namespaced into the “admin” module, including EditDomain’s API counterpart.
I’m not sure diving headfirst into the API of this product without using the panel first is the right way to go about things. These are things that can be elucidated by looking at how the UI does it or referring back to documentation.
Admin_Module is allowed for apiscp panel’s admin user, and other modules are allowed for user role. Of course, admin can access to user role’s apis with session id.
Is this correct?
Actually, if you do what you’re told, and work with the Panel, you’ll find the answers.
For example, in Nexus, if you enable SSH and Crontab, you’ll see a confirmation of the command that was run. You can then apply that via the API to accomplish the same task.
Ok, I tried to enable crontab and ssh in UI, so yes I can see success message with what command lines were run, which is good.
But how to run this via api?
I saw this api document. https://api.apiscp.com/Crontab_Module.html
There is no function to enable crontab, actually this is what my problem is for now.
Please let me know how to convert or know which function I have to use for example.
Thanks.