When I read about this here https://www.directadmin.com/api.php, it clearly said that
My question is which is the preferable method to use here CMD_POP or CMD_API_POP? because sometimes I can see that CMD_API_SOMETHING does not work but CMD_SOMETHING works. Today I notice my old script that has this CMD_API_ADMIN_SETTINGS (used to work perfectly) now does not work:
I got the following error message:
But, if I switch to CMD_API_ADMIN_SETTINGS to CMD_ADMIN_SETTINGS it works perfectly with the following message:
So my question to directadmin developers, which CMD_ api command you update the most in directadmin binary, the one that you recommend people to use so that, this thing won't break in the future? Should I stick with CMD_ or CMD_API ?
Code:
... both CMD_POP and CMD_API_POP use the exact same code internally. If CMD_POP can do it, CMD_API_POP can do it. The only difference is the ouput. The API version will generate pareseable output."
My question is which is the preferable method to use here CMD_POP or CMD_API_POP? because sometimes I can see that CMD_API_SOMETHING does not work but CMD_SOMETHING works. Today I notice my old script that has this CMD_API_ADMIN_SETTINGS (used to work perfectly) now does not work:
Code:
cmd_api="CMD_API_ADMIN_SETTINGS"
data="auto_update=yes&backup_threshold=90&demo_admin=no&demo_reseller=no&demo_user=no&oversell=yes&service_email_active=yes&suspend=yes&user_backup=yes&json=yes&action=save"
curl --silent --request "${method}" --user "${api_username}":"${api_password}" --data "${data}" "${ssl_protocol}://${C_BOX_HOSTNAME_FQHN}:${C_DA_PORT}/${cmd_api}"
I got the following error 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
But, if I switch to CMD_API_ADMIN_SETTINGS to CMD_ADMIN_SETTINGS it works perfectly with the following message:
Code:
{
"result": "",
"success": "saved"
}
So my question to directadmin developers, which CMD_ api command you update the most in directadmin binary, the one that you recommend people to use so that, this thing won't break in the future? Should I stick with CMD_ or CMD_API ?
Last edited: