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.

WHM API1 killpkg function doesn't work

Discussion in 'cPanel Developers' started by mtorromeo, Mar 25, 2015.

  1. mtorromeo

    mtorromeo Registered
    PartnerNOC

    Joined:
    Jul 25, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    The api function killpkg[1] always results in this error:

    Code:
    command: killpkg
    reason: There was an error when the system attempted to delete the package “”: You must     specify a package.
    result: 0
    version: 1
    
    but the pkg parameter was correctly specified like this: localhost:2086/json-api/killpkg?api.version=1&pkg=test

    [1] https://documentation.cpanel.net/display/SDK/WHM+API+1+Functions+-+killpkg
     
    #1 mtorromeo, Mar 25, 2015
    Last edited by a moderator: Mar 25, 2015
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    1. Which version of cPanel & WHM are you using?
    2. Does the package exist on the server?
    3. What is recorded in /usr/local/cpanel/logs/error_log when you call the killpkg call?
     
  3. Xaser83

    Xaser83 Registered

    Joined:
    Sep 4, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Netherlands
    cPanel Access Level:
    Root Administrator
    I have the exact same problem as described above.

    The query i'm using is: /json-api/killpkg?api.version=1&pkg=new2
    The used version: WHM 11.50.0 (build 30)

    I have confirmed that the package is still present.

    The error log says:
    [2015-09-04 11:56:33 +0200] info [xml-api] There was an error when the system attempted to delete the package “”: You must specify a package. [killpkg] version [1].
     
  4. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    510
    Likes Received:
    66
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi,

    I've verified this and reported it in case CPANEL-1378. Thanks for the report!
     
  5. cPDavidN

    cPDavidN cPanel Developer
    Staff Member

    Joined:
    Mar 19, 2013
    Messages:
    42
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    DataCenter Provider
    We got this wrong in the documentation. The parameter name should be 'pkgname', not 'pkg'. Sorry for the inconvenience; we'll get that updated ASAP.
     
  6. Xaser83

    Xaser83 Registered

    Joined:
    Sep 4, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Netherlands
    cPanel Access Level:
    Root Administrator
    I tried 'pkgname' as option and it works flawless now.
    Thanks for the help.
     
Loading...

Share This Page