Description


This function adds a package extension to a hosting plan (package).


If you need to edit a package extension's parameters, call this function again with the same package extension name and the updated package extension variables. 


Examples




https://hostname.example.com:2087/cpsess##########/json-api/addpkgext?api.version=1&name=package1&_PACKAGE_EXTENSIONS=extension1




https://hostname.example.com:2087/cpsess##########/xml-api/addpkgext?api.version=1&name=package1&_PACKAGE_EXTENSIONS=extension1




whmapi1 addpkgext name=package1 _PACKAGE_EXTENSIONS=extension1



{
  "data": {
    "pkg": "package1"
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "addpkgext"
  }
}




<result>
    <data>
        <pkg>package1</pkg>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>addpkgext</command>
    </metadata>
</result>



   

Parameters

ParameterTypeDescriptionPossible valuesExample
namestring

Required

The hosting plan's name.

A valid hosting plan name.

You cannot use the name extensions.


package1
_PACKAGE_EXTENSIONSstring

Required

The hosting plan's package extensions.

A space-delimited list of one or more package extensions on the server.

  • You can also include the extension's variables in your function call, in key=value format. Consult the extension's documentation for a list of possible variables.
  • Extension names and variables are case-sensitive.


extension1

Returns

ReturnTypeDescriptionPossible valuesExample

pkg

string

The hosting plan's name.

The name input parameter's value.package1