The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Test if a feature is enabled or not via the cPanel xmlapi (not WHM)?

Discussion in 'cPanel Developers' started by skyd, Oct 4, 2012.

  1. skyd

    skyd Member

    Joined:
    Sep 6, 2012
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Website Owner
    Hi,

    Any way to test if a feature is active or not via the cPanel xmlapi (ports 2082/2083) and not the WHM ports (2086/2087)?

    E.g., "getfile" in Fileman Module Documentation: The description states that "It requires access to the 'filemanager' feature".
    How can that be tested not via the WHM ports?

    Thanks.
     
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Unfortunately, there is not an API1 or API2 call that provides a feature check.

    If you were making the queries locally, instead of the going throught the Remote API (xmlapi), you could use the cpanelfeature tag in leu of an API call. You can also use the cpanelfeature method provided by LiveAPI.

    Regards,
    -DavidN
     
  3. morissette

    morissette Well-Known Member

    Joined:
    May 24, 2009
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Austin, TX
    cPanel Access Level:
    Root Administrator
  4. skyd

    skyd Member

    Joined:
    Sep 6, 2012
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Website Owner
    Thanks guys.
    If I understand correctly, both solutions refer to something that will run on the cPanel server (please correct me if I'm wrong).

    I'm looking for a remote solution that won't utilize the WHM ports - from the answers I get the impression that it's not possible...
     
  5. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you're looking for a solution that doesn't require root access, then your understanding is correct: it is not possible.

    If you have root access, then you can create/deploy a cPanel Module, which extends the cPanel API, and it will be available on cPanel ports just like other API1/API2 calls. Basically, cPanel does not offer exactly what you need, but you can add that functionality to your servers (that is, if you have admin access)
     
Loading...

Share This Page