DirectAdmin has run two API surfaces for several years: the original CMD_API_* and CMD_* form endpoints on port 2222 that return URL-encoded or JSON data, and the newer REST-style /api/ endpoints introduced with the Go rewrite. Since 1.688 the project has been removing legacy endpoints one release at a time, and by 1.712 several that billing platforms, monitoring tools and in-house scripts relied on have gone. The removals are announced in the changelog, but scripts do not read changelogs. This guide lists the removals to date and shows how to find and replace them.
Applies to DirectAdmin 1.688 to 1.712
Short answer: Between 1.688 and 1.712 DirectAdmin removed the ModSecurity log from CMD_MODSECURITY?action=log, the /docs/swagger.json redirect, CMD_AJAX_GET_COUNTS, the six resource-usage LIMITS endpoints, the File Manager tree actions and CMD_AJAX_SEARCH. Most have a JSON /api/ replacement listed in the server’s own /static/swagger.json; two have none named. Grep /var/log/directadmin/access.log* for CMD_ requests to find the scripts, plugins and billing modules still calling them, then move those calls to /api/ with a scoped login key. (Reviewed October 2026.)
Table of Contents
The removals so far
The endpoints below are gone as of the versions shown, according to the DirectAdmin changelog for each release. We checked each one on a DirectAdmin 1.712 lab server on 21 October 2026.
CMD_MODSECURITY?action=log(1.688):CMD_MODSECURITYitself stays, but it no longer returns the ModSecurity log. Replaced byGET /api/modsecurity-audit-log/summary(key data from the log) andGET /api/modsecurity-audit-log/entry(one event in detail).- The
/docs/swagger.jsonredirect (1.703): only the old address was removed, not the API description. Every server still serves its full OpenAPI (Swagger 2.0) spec at/static/swagger.json; ours listed 273 paths, while/docs/swagger.jsonnow just redirected to the panel start page. Evolution shows the same spec at User Level under Support & Help → Live API Documentation. CMD_AJAX_GET_COUNTS(1.704): an internal skin endpoint. The changelog names no replacement (the same release dropped theajax_cache_max_timesetting). If a monitor used it as a cheap login check,GET /api/sessionanswered with the session’s details on our server.- The resource-usage pages (1.706):
CMD_USER_LIMITSandCMD_API_USER_LIMITSare replaced by/api/resource-usage(/latestand/historyin the spec);CMD_RESELLER_LIMITS,CMD_API_RESELLER_LIMITS,CMD_ADMIN_LIMITSandCMD_API_ADMIN_LIMITSby/api/global-resource-usage. These showed CPU, memory and I/O use under resource limits, not package quotas. Both replacements answeredACCESS_DENIEDto our admin login key on a server without resource limits configured, so we have not seen their output. For disk, bandwidth and account counts per user, useGET /api/users/USER/usage. - The File Manager
treeandparent_treeactions (1.711):CMD_FILE_MANAGERstays, but rejects these two actions (on our serveraction=treereturned the Evolution HTML page instead of data). The changelog names no replacement; the server’s spec hasGET /api/filemanager/tree, which returned a JSON directory tree for us. CMD_AJAX_SEARCH(1.712): the skin search box. Replaced byGET /api/search/users,GET /api/search/users-extended(also returns matching domains and pointers) andGET /api/search/resources. On our 1.712 server a request toCMD_AJAX_SEARCHgot a 302 redirect instead of data, and/api/search/usersreturned a JSON array of user names (["admin"]).
Two related deprecations belong on the same list even though they are scripts rather than endpoints: CMD_MOVE_USERS stopped calling move_user_to_reseller.sh in 1.703 (custom logic in custom/move_user_to_reseller.sh has to move to the move_user_to_reseller_pre and _post hooks, and the script itself now calls POST /api/change-user-creator), and 1.711 stopped creating private_html directories for new domains and subdomains, so a script that expects one will not find it.
Find what still calls them
Every request to the panel is logged. Search the access log for the retired names and for any CMD_ request coming from an automated client, identifiable by a fixed user agent or an API key login:
grep -hoE 'CMD_[A-Z_]+' /var/log/directadmin/access.log* | sort | uniq -c | sort -rn
grep -E 'CMD_AJAX_SEARCH|CMD_AJAX_GET_COUNTS|CMD_MODSECURITY|_LIMITS|action=(parent_)?tree|docs/swagger' /var/log/directadmin/access.log* | awk '{print $1}' | sort | uniq -c
The second command lists the client IPs still calling removed endpoints. Typical callers are a WHMCS or Blesta module pinned to an old version, a custom provisioning script, an uptime checker that hit CMD_AJAX_GET_COUNTS because it was cheap, and skins or plugins that were never updated. Plugins are worth a separate search because they run on the server:
grep -rl 'CMD_AJAX_\|CMD_MODSECURITY\|_LIMITS' /usr/local/directadmin/plugins/ 2>/dev/null
Move to /api/
The /api/ endpoints accept the same two authentication methods as the legacy ones: HTTP Basic authentication with a user name and login key, or a session cookie. DirectAdmin’s API documentation recommends Basic authentication with a dedicated login key for scripts. Create one with only the commands the script needs (and an IP restriction), at Admin Level → Login Keys, and call the JSON endpoints with it:
curl -s -u 'admin:LOGINKEY' https://server.example.net:2222/api/search/users | jq -r '.[]'
curl -s -u 'admin:LOGINKEY' https://server.example.net:2222/api/users/USER/usage | jq '{domains, bandwidthBytes}'
curl -s -u 'admin:LOGINKEY' -o swagger.json https://server.example.net:2222/static/swagger.json
There is no /api/users list endpoint on 1.712: /api/search/users (optional q and limit parameters) returns the accessible user names as an array of strings, and per-user details come from /api/users/USER/usage and /api/users/USER/config.
Responses are JSON with stable field names, which removes the URL-decoding step that made the legacy API awkward to script. The spec at /static/swagger.json lists every path your server supports, with its parameters; fetch it from your own server after each upgrade rather than keeping an old copy, because new paths such as the TLS system’s appear there first.
For billing modules, check the access log first and update to the vendor’s current release before rewriting anything. A module is only affected if it calls one of the removed endpoints above: many CMD_API_ calls are still in place, and CMD_API_SHOW_USER_USAGE, for example, still answered on our 1.712 server. We did not test any billing module.
Common pitfall: assuming CMD_API_ endpoints are next
Not everything under CMD_API_ is scheduled for removal. The core provisioning endpoints such as CMD_API_ACCOUNT_USER and CMD_API_SHOW_USERS remain in place, and the changelog names each removal explicitly. Rewriting every integration pre-emptively is wasted effort; auditing the access log after each upgrade is not. The practical rule is to migrate a call when its replacement appears in the /api/ documentation, and to treat a deprecation notice in the changelog as the deadline.
Keep it running
Add a check to the post-upgrade routine that runs the access-log search above and flags any hit on the removed endpoints, and read the changelog section on removed endpoints for every release before it is applied on production. The stable channel usually runs one version behind current, so a removal can be tested before it arrives: run integrations against a test server on the current channel, so a removal surfaces there before it reaches production. The commands for channel selection are in The da CLI: update, build and config-set.
DirectAdmin removed API endpoints at a glance


Official documentation: DirectAdmin documentation, Linux man pages.
Related guides: Using the da CLI: da update, da build, da config-set, da user and update channels · Broken custom Apache/nginx templates after the DOCROOT token change in DirectAdmin 1.710 · Installing DirectAdmin on AlmaLinux 9/10 and Debian 13 (modern license, web installer vs CLI).
Frequently asked questions
Does the removal of legacy endpoints also affect WHMCS and Blesta DirectAdmin modules?
Only if the module calls one of the removed endpoints. Most provisioning uses CMD_API_ calls that 1.712 still answers. Search the panel access log for the removed names, and if they appear, update the module to the vendor’s current release or ask the vendor. We did not test any billing module.
How long does migrating a script from CMD_ endpoints to /api/ take?
For most provisioning scripts a few hours: the login key and authentication are unchanged, and the work is mapping each call to its /api/ path in your server’s /static/swagger.json and switching from URL-encoded parsing to JSON.
Can I undo this?
Not on the server side, because removed endpoints are gone from the binary and the only way to get them back is to run an older DirectAdmin release, which is not advisable: 1.711 alone fixed a local privilege escalation in the new TLS system. Script changes can be reverted, but the legacy calls they restore will keep failing.
Maintenance record
This guide changes servers, data or security settings, so we re-check it against current versions on a fixed schedule. Take a backup or snapshot before you start.
- Maintained by
- srvScripts editorial team
- Supported versions
- DirectAdmin 1.688 to 1.712
- Last full review
- Next review
- Sources
- docs.directadmin.com
