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.

Problem Listpkgs WHM Api Reseller

Discussion in 'cPanel Developers' started by risklife, Jan 23, 2015.

  1. risklife

    risklife Member

    Joined:
    Dec 16, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi, i have a problem with listpkgs WHM API, i try get all pkgs in a account reseller, but only show 2 packages and i have 4.

    PHP:
    <?php
    include("xmlapi.php"); 

    $ip "localhost";  //your server IP or name

    $xmlapi = new xmlapi($ip);  // instantiate the XML-API object 
    $root_hash 'HASH';
    $xmlapi->set_port(2087); 

    //store our auth in object 
    $xmlapi->hash_auth("reseller",$root_hash);

    //// Optional stuff 
    // JSON or XML output 
    $xmlapi->set_output('xml'); 
    // Debugging, great for at the console 
    $xmlapi->set_debug(1); 

    $response $xmlapi->listpkgs();                           
                   
    ?>
    Log: Only show 2
    Code:
    <listpkgs>
      <package>
        <name>reseller_10GB</name>
        <_PACKAGE_EXTENSIONS></_PACKAGE_EXTENSIONS>
      </package>
      <package>
        <name>reseller_20GB</name>
        <_PACKAGE_EXTENSIONS></_PACKAGE_EXTENSIONS>
      </package>
    </listpkgs>
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Have you verified the other packages do not belong to "root" or another reseller? Are all four visible when accessing WHM as the reseller? Note the documentation on this WHM API 1 function at:

    WHM API 1 - listpkgs

    Thank you.
     
Loading...

Share This Page