Results 1 to 3 of 3

Thread: How to make request to DirectAdmin with REST API?

  1. #1
    Join Date
    Jul 2017

    How to make request to DirectAdmin with REST API?

    Does anyone know how I can make a query for API from DirectAdmin?

    I'm using AngularJS + .NET and I communicate with services via REST API - POST, GET, UPDATE, DELETE etc. but in documentation from directadmin there is not any URL where I can make request. There are only Commands: CMD_ACCOUNT_RESELLER etc. I guess this is for PHP services. So how can I communicate with that API in "normal way"?

  2. #2
    Join Date
    Feb 2016
    There is no REST API for DirectAdmin, and what you see is the "normal way". It's language agnostic, and works with PHP, Ruby, .NET, and every other language that can make an HTTP request.

  3. #3
    Join Date
    May 2008
    The Netherlands
    Bare in mind that the DA API format was made like 14 years ago; at which time the REST format was no way the standard that it is today.


    A very basic PHP example is this:

    PHP Code:


    $y urldecode($x);



    I just tested this; this returns an array with the info from the API.


    So basically you need to make a simple http request, with basic authentication:

    Then you need to decode the url, and parse it. You could search for replacement functions of urldecode and parse_str for your language; usually those are easily found in any popular language.
    ~ Arieh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts