Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function deletes a hosting plan (package).

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/killpkg?pkg=package1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/killpkg?pkg=package1
 Command Line
whmapi0 killpkg pkg=package1

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 0 documentation or run the whmapi0 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
   "result":[
      {
         "status":1,
         "statusmsg":"The package was successfully deleted."
      }
   ]
}
 Output (XML)
<killpkg>
     <result>
            <status>1</status>
            <statusmsg>The package was successfully deleted.</statusmsg>
      </result>
</killpkg>

   

Parameters

ParameterTypeDescriptionPossible valuesExample
pkgstring

Required

The hosting plan's name.

A valid hosting plan name on the server.package1

 

Returns

ReturnTypeDescriptionPossible valuesExample
resultarray of hashesAn array of hashes of function information.This hash includes the status and statusmsg returns. 

status

Boolean

Whether the function succeeded.

The function returns this value in the result hash.

  • 1 — Success.
  • 0 — Failure.
1

statusmsg

string

A message of success or a reason for failure.

The function returns this value in the result hash.

  • The package was successfully deleted.
  • An error message.
The package was successfully deleted.