My API script isn't working

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » DirectAdmin » API and Plugins

My API script isn't workingLast Modified: Apr 5, 2020, 3:06 pm
If you're trying to post some data to DirectAdmin with the API, but are not getting the desired results, rather than trying to figure out what's wrong with your scirpt, it's usually easier to be shown what you're passing and what should be passed.

1) To do this, run DirectAdmin in debug mode, with the "| grep string" option.   This will show you what's being passed.

2) Then test the function you want with your browser normally through DA (without your script).  The posted data will be shown in the debug output.

3) Lastly, test the function using your API script.  Again, the data being passed will be shown.  Compare the output generated from your script with the output generated from the browser.  Adjust your script to match, and it should work.


  1. You can only show CMD_* class in the output by setting

    ./directadmin set debug_only_cmd 1

  2. DA binaries compiled after April 1, 2020 can use debug level exactly 188 to show only the request information.

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST