Child pages
  • WHM API 1 Functions - addpkgext

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description


Excerpt

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


Note
titleNote:

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. 


Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


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



Expand
titleXML API


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



Expand
titleCommand Line


Code Block
languagebash
whmapi1 addpkgext name=package1 _PACKAGE_EXTENSIONS=extension1

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


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



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<result>
    <data>
        <pkg>package1</pkg>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>addpkgext</command>
    </metadata>
</result>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


   

Parameters

ParameterTypeDescriptionPossible valuesExample
namestring

Required

The hosting plan's name.

A valid hosting plan name.

Note
titleNote:

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.

Note
titleNotes:
  • 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