Manage2 API
The Manage2 API allows you to automate certain procedures related to license management. Most often, you will create a script that utilizes the Manage2 API to retrieve and manipulate licensing information. This allows you to build a customized interface or automate Manage2 processes.
The Manage2 API can output information in 3 formats:
For more information, read our
documentation on choosing an output format.
Each of these API functions can be called through
get or
post HTTP calls. We recommend that you use a
post HTTP call.
Formatting and using API calls
Using a web browser
Each API call can be formatted as an HTTP request. To create a function call:
- Begin with the HTTP address of Manage2.
-
https://manage2.cpanel.net
- To call the script, simply type the function name after the web address.
- Example:
https://manage2.cpanel.net/XMLlicenseInfo.cgi (where XMLlicenseInfo.cgi is the name of the function being called).
- The XML output format will be used by default. To change the output format, you will need to pass the
output parameter to the function being called.
Examples:
- JSON —
https://manage2.cpanel.net/XMLlicenseInfo.cgi?output=json
- YAML —
https://manage2.cpanel.net/XMLlicenseInfo.cgi?output=yaml
-
Remember: You need to be logged in with the proper permissions in order to call a function. Simply add the IP address from which you are calling the function to your Manage2 profile using the Add an access IP function.
Using a Perl module
The Manage2 Perl client API allows you to perform licensing functions from the Perl scripting language.
Using a PHP class
The PHP cPanelLicensing class simplifies development of automated cPanel License provisioning. This class requires PHP5 with
curl support and SimpleXML support (which is on by default). This class returns SimpleXML objects by default; however, it can be configured to return XML, JSON, or YAML.
Note: SimpleXML is a feature of PHP5 that allows XML to easily be transformed into data structures similar to associative arrays.
Functions
Note: Many of the functions below take license, group, and package IDs as input. You can obtain these variables from the output of other API calls. However, when you use the IDs as input variables, they are not exactly the same as the output returned by another API function. As you will see, the IDs are often prefixed by a letter when they are output. In order to use these IDs as input, you will need to remove the initial letter so that, for example,
G10001 will become
10001.
- Add licenses (
XMLlicenseAdd.cgi) — This function allows you to purchase and add a new license to your Manage2 account.
- Add a pickup passphrase (
XMLaddPickupPass.cgi) — This function adds a pickup passphrase.
- Change a license's IP address (
XMLtransfer.cgi) — This function will change the IP address associated with a particular license. This is useful if you wish transfer a license to a new server.
- Display groups (
XMLgroupInfo.cgi) — This function will list all of the groups associated with your Manage2 account.
- Expire licenses (
XMLlicenseExpire.cgi) — This function expires existing licenses.
- Extend one time licenses (
XMLonetimeext.cgi) — This function allows you to extend a one time license.
- Fetch risk data (
XMLsecverify.cgi) — This function allows you fetch the estimated probability of fraud risk associated with an IP address.
- List license information (
XMLlicenseInfo.cgi) — Get a list of all licenses in your account.
- List package information (
XMLpackageInfo.cgi) — This function will retrieve and display a list of packages that are available to your Manage2 account.
- Look up license ID (
XMLlookup.cgi) — This function allows you to look up a license ID using an IP address.
- Raw lookup (
XMLRawLookup.cgi) — This function will list all of the license information associated with a specific IP address.
- Reactivate expired licenses (
XMLlicenseReActivate.cgi) — This function reactivates expired licenses.
- Register key-based authentication (
XMLregisterAuth.cgi) — This function retrieves a key and registers the calling computer to be able to authenticate with it.
- Request a license transfer (
XMLtransferRequest.cgi) — This function allows you to request a license be transferred from one company to another.
Topic revision: r13 - 20 May 2011 - 15:44:49 - Main.MelanieSeibert
ManageTwo.Manage2Api moved from Sandbox.Manage2Api on 21 Jul 2009 - 19:09 by Main.JustinSchaefer -
put it back