Manage Hosting Spaces

Manage Hosting Spaces

AddPackage

Adds a package to the specified user account.

Method: AddPackage (int userId, int planId, string packageName, string packageComments, int statusId, DateTime purchaseDate)

Endpoint: http://<Enterprise Server URL>/esPackages.asmx

Input:

  • userID – userID of user to add package to
  • planID – ID of hosting plan
  • PackageName – Package name
  • PackageComments – Comments
  • statusId – status of the user’s package to be created. The following statuses are available: 1 – Active, 2 – Suspended, 3 – Cancelled, 4 – New;
  • purchaseDate – package purchase date (required);

Return: PackageResult object that contains created user package ID or error code and exceeding quotas if any;

UpdatePackage

Updates a hosting package. Returns PackageResult object that has 0 status code if package updated successfully or error code and exceeding quotas if any;

Method: UpdatePackage (PackageInfo package)

Endpoint: http://<Enterprise Server URL>/esPackages.asmx

Input: PackageInfo – a package info structure

Return: Returns PackageResult object that has 0 status code if package updated successfully or error code and exceeding quotas if any;

GetPackages

Retrieves all packages for a particular user

Method: GetPackages(int userId)

Endpoint: http://<Enterprise Server URL>/esPackages.asmx

Input: userID – user ID of package owner

Return: A list of packageinfo structures

DeletePackage

Deletes a user’s hosting package. Returns 0 if package deleted successfully;

Method: DeletePackage (int packageId)

Endpoint: http://<Enterprise Server URL>/esPackages.asmx

Input:packageID – The packageID

Return: Returns 0 if package deleted successfully;

ChangePackageStatus

Changes user’s hosting package current status. The following statuses are available: 1 – Active, 2 – Suspended, 3 – Cancelled, 4 – New. Returns 0 if package status changed successfully;

Method: ChangePackageStatus (int packageId, PackageStatus status)

Endpoint: http://<Enterprise Server URL>/esPackages.asmx

Input:

  • packageID – The packageID
  • status – The package status 1 – Active, 2 – Suspended, 3 – Cancelled, 4 – New

Return: Returns 0 if package status changed successfully;

UpdatePackageName

Updates user’s package name and comments. Returns 0 if package name and comments changed successfully.

Method: UpdatePackageName (int packageId, string packageName, string packageComments)

Endpoint: http://<Enterprise Server URL>/esPackages.asmx

Input:

  • packageID – The packageID
  • PackageName – Package name
  • PackageComments – Comments

Return: Returns 0 if package name and comments changed successfully.

AddPackageAddon

Adds a hosting addon to the user’s hosting package.

Method: AddPackageAddon (PackageAddonInfo addon)

Endpoint: http://<Enterprise Server URL>/esPackages.asmx

Input:

  • PackageId – ID of the package to be upgraded;
  • PlanId – ID of the hosting addon you wish to add to the hosting package;
  • Quantity – quantity of the hosting addon. The minimum value is 1;
  • StatusId – ID of the hosting addon status. The following statuses are available: 1 – Active, 2 – Suspended, 3 – Cancelled, 4 – New;
  • PurchaseDate – hosting addon purchased date;

Return: PackageResult object that contains created hosting package addon ID or error code and exceeding quotas if any.

UpdatePackageAddon

Updates a hosting package addon details. Returns PackageResult object that contains 0 status code if hosting package addon updated successfully or error code and exceeding quotas if any.

Method: UpdatePackageAddon (PackageAddonInfo addon)

Endpoint: http://<Enterprise Server URL>/esPackages.asmx

Input: addon – a packageAddonInfo structure

Return: PackageResult object that contains 0 status code if hosting package addon updated successfully or error code and exceeding quotas if any.

DeletePackageAddon

Deletes addon from the hosting package assigned. Returns 0 if addon deleted from hosting package successfully.

Method: DeletePackageAddon (int packageAddonId)

Endpoint: http://<Enterprise Server URL>/esPackages.asmx

Input:packageAddonID – The package AddonID

Return: Returns 0 if addon deleted from hosting package successfully.

GetPackageAddon

Gets a hosting package addon details.

Method: GetPackageAddon (int packageAddonId)

Endpoint: http://<Enterprise Server URL>/esPackages.asmx

Input:packageAddonID – The package AddonID

Return: A package Addon structure

GetPackageAddons

Gets the hosting package addon.

Method: GetPackageAddon (int packageId)

Endpoint: http://<Enterprise Server URL>/esPackages.asmx

Input:packageID – The packageID

Return: A list of package Addon structures