Documentation > MSPControl API
Rating: 4.0/5. From 2 votes.
Please wait...
BasicFull


MSPC Integration API 

 

Introduction

This document describes basic MSPC Integration API that could be used in 3rd-party
applications.

Requirements

· WSE 3.0 or Basic Authentication
· Each API call should have user’s credentials provided

Basic Authentication

For interacting with MSPC API you should use Basic Authentication. MSPC recognizes
“Authorization” header with the user credentials provided in the following format: username:password.

Basic Web Services

Manage User Accounts

AddUser (UserInfo user, bool sendLetter) – creates a user account and sends confirmation to the user’s
email.
Endpoint: http://<Enterprise Server URL>/esUsers.asmx
The “user” parameter requires the following fields to be set:
OwnerId – ID of the user that owns account to be created;
RoleId – ID of the user role to be created. The following roles available: 1 – Administrator, 2 – Reseller
and 3 – User;
StatusId – ID of the user status to be created. The following statuses available: 1 – Active, 2 –
Suspended, 3 – Cancelled and 4 – Pending;
IsDemo – specifies that created account intends for demonstration purposes only. When user is in demo
all management functionality becomes inaccessible;
IsPeer – specifies that created account is a peer for the user’s owner;
Username – username of the account to be created;
Password – password of the account to be created;
FirstName – first name of the account to be created;
LastName – last name of the account to be created;
Email – e-mail address of the account to be created;
All other fields of the “user” parameter are optional.
Also you may decide to set “sendLetter” parameter to “true” if you would like to send user registration
notification.
Method returns ID of the created account or error code occurred during account creation.

UserExists (string username) – gets a value indicating whether a username already exists.
Endpoint: http://<Enterprise Server URL>/esUsers.asmx

AuthenticateUser (string username, string password, string ip) – gets a value indicating that provided
credentials are correct.
Endpoint: http://<Enterprise Server URL>/esAuthentication.asmx

Method returns the following statuses: -109 – wrong username has been specified, -110 – wrong
password has been specified, -105 – user account has been cancelled, -103 – user account still in
pending status, 0 – user credentials specified are correct;

GetUserById (int userId) – gets user account details by ID specified;
Endpoint: http://<Enterprise Server URL>/esUsers.asmx

GetUserByUsername (string username) – gets user account details by username specified;
Endpoint: http://<Enterprise Server URL>/esUsers.asmx

GetUsers (int ownerId, bool recursive) – gets all users for the specified owner. If you would like to obtain
users recursively then set “recursive” parameter to “true”;
Endpoint: http://<Enterprise Server URL>/esUsers.asmx

UpdateUser (UserInfo user) – updates user account details. Returns status 0 if account updated
successfully;
Endpoint: http://<Enterprise Server URL>/esUsers.asmx

DeleteUser (int userId) – deletes user account from the database. Returns 0 if account deleted
successfully;
Endpoint: http://<Enterprise Server URL>/esUsers.asmx

ChangeUserPassword (int userId, string password) – changes user account password. Returns 0 if
password changed successfully;
Endpoint: http://<Enterprise Server URL>/esUsers.asmx

ChangeUserStatus (int userId, UserStatus status) – changes user account current status. The following
statuses available: 1 – Active, 2 – Suspended, 3 – Cancelled and 4 – Pending; Returns 0 if status changed
successfully;
Endpoint: http://<Enterprise Server URL>/esUsers.asmx

 

Manage Hosting Spaces

AddPackage (int userId, int planId, string packageName, string packageComments, int statusId,
DateTime purchaseDate) – adds a package to the specified user account.
Endpoint: http://<Enterprise Server URL>/esPackages.asmx
As you can see the most of parameters are self-explainable. The only two parameters require additional
explanation:
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);
Methods returns PackageResult object that contains created user package ID or error code and
exceeding quotas if any;

UpdatePackage (PackageInfo package) – updates a hosting package. Returns PackageResult object that
has 0 status code if package updated successfully or error code and exceeding quotas if any;
Endpoint: http://<Enterprise Server URL>/esPackages.asmx

DeletePackage (int packageId) – deletes a user’s hosting package. Returns 0 if package deleted
successfully;
Endpoint: http://<Enterprise Server URL>/esPackages.asmx

ChangePackageStatus (int packageId, PackageStatus status) – 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;
Endpoint: http://<Enterprise Server URL>/esPackages.asmx

UpdatePackageName (int packageId, string packageName, string packageComments) – updates user’s
package name and comments. Returns 0 if package name and comments changed successfully.
Endpoint: http://<Enterprise Server URL>/esPackages.asmx

Upgrade/Downgrade User’s Packages

AddPackageAddon (PackageAddonInfo addon) – adds a hosting addon to the user’s hosting package.
Endpoint: http://<Enterprise Server URL>/esPackages.asmx

The “addon” parameter requires the following fields to be set:
PackageAddonId – ID of the package addon;
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;

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

UpdatePackageAddon (PackageAddonInfo addon) – 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.
Endpoint: http://<Enterprise Server URL>/esPackages.asmx

DeletePackageAddon (int packageAddonId) – deletes addon from the hosting package assigned. Returns
0 if addon deleted from hosting package successfully.
Endpoint: http://<Enterprise Server URL>/esPackages.asmx

GetPackageAddon (int packageAddonId) – gets a hosting package addon details.
Endpoint: http://<Enterprise Server URL>/esPackages.asmx

 

Manage Hosting Plan/Hosting addon

AddHostingPlan (HostingPlanInfo plan) – add a hosting plan.
Endpoint: http://<Enterprise Server URL>/esPackages.asmx
The “plan” parameter requires the following fields to be set:
PlanId – ID of the hosting plan you wish to add;

PlanName – Name of the hosting plan;

PlanDescription – Description of the hosting plan;

IsAddon – must be set to “false”;

UserId – ID of the user that owns plan;

Groups –  HostingPlanGroupInfo array;

Quotas –  HostingPlanQuotaInfo array;

 

The HostingPlanGroupInfo requires the following fields to be set:

GroupId – ID of the resource group;

Enabled – enable/disable resource group;

 

The HostingPlanQuotaInfo requires the following fields to be set:

QuotaId – ID of the quota;

QuotaValue – Value of the quota;

 

 

Available resource groups:

GroupID               GroupName

1             OS

2             Web

3             FTP

4             Mail

5             MsSQL2000

6             MySQL4

7             DNS

8             Statistics

10           MsSQL2005

11           MySQL5

12           Exchange

13           Hosted Organizations

20           Sharepoint  Server

21           Hosted CRM

22           MsSQL2008

23           MsSQL2012

24           Hosted CRM2013

30           VPS

31           BlackBerry

32           OCS

33           VPS2012

40           VPSForPC

41           Lync

42           HeliconZoo

44           EnterpriseStorage

45           RDS

46           MsSQL2014

47           Service Levels

48           Sharepoint Enterprise Server

49           StorageSpaceServices

50           MicrosoftOnlineServices

51           MsSQL2016

60           System

 

Available Quotas:

QuotaID               GroupName        QuotaDescription

51           OS          Bandwidth, MB

52           OS          Disk space, MB

53           OS          Domains

54           OS          Sub-Domains

55           OS          File Manager

71           OS          Scheduled Tasks

72           OS          Interval Tasks Allowed

73           OS          Minimum Tasks Interval, minutes

74           OS          Applications Installer

75           OS          Extra Application Packs

47           OS          ODBC DSNs

220        OS          Domain Pointers

410        OS          Allow Tenants to Create Top Level Domains

411        Web       Application Pools Restart

13           Web       Web Sites

94           Web       ColdFusion

95           Web       Web Application Gallery

96           Web       ColdFusion Virtual Directories

97           Web       Remote web management allowed

100        Web       Dedicated IP Addresses

57           Web       CGI-BIN Folder

58           Web       Secured Folders

59           Web       Shared SSL Folders

60           Web       Web Sites Redirection

61           Web       Changing Sites Root Folders

25           Web       ASP.NET 1.1

26           Web       ASP.NET 2.0

27           Web       ASP

28           Web       PHP 4.x

29           Web       PHP 5.x

30           Web       Perl

31           Web       Python

32           Web       Virtual Directories

33           Web       FrontPage

34           Web       Custom Security Settings

35           Web       Custom Default Documents

36           Web       Dedicated Application Pools

37           Web       Custom Headers

38           Web       Custom Errors

39           Web       Custom MIME Types

331        Web       ASP.NET 4.0

332        Web       SSL

333        Web       Allow IP Address Mode Switch

334        Web       Enable Hostname Support

335        Web       SSL from Let's Encrypt

336        Web       App pool max CPU usage (1/1000ths of one percent)

337        Web       App pool max CPU usage under load (1/1000ths of one percent)

344        Web       htaccess

4             FTP         FTP Accounts

14           Mail       Mail Accounts

18           Mail       Mail Forwardings

102        Mail       Disable Mailbox Size Edit

40           Mail       Max Mailbox Size

49           Mail       Max Group Recipients

50           Mail       Max List Recipients

20           Mail       Mail Lists

24           Mail       Mail Groups

41           MsSQL2000         Max Database Size

42           MsSQL2000         Database Backups

43           MsSQL2000         Database Restores

44           MsSQL2000         Database Truncate

15           MsSQL2000         Users

3             MsSQL2000         Databases

204        MsSQL2000         Max Log Size

2             MySQL4               Databases

19           MySQL4               Users

103        MySQL4               Max Database Size

104        MySQL4               Database Restores

105        MySQL4               Database Truncate

45           MySQL4               Database Backups

48           DNS       DNS Editor

12           Statistics              Statistics Sites

62           MsSQL2005         Databases

63           MsSQL2005         Users

64           MsSQL2005         Max Database Size

65           MsSQL2005         Database Backups

66           MsSQL2005         Database Restores

67           MsSQL2005         Database Truncate

203        MsSQL2005         Max Log Size

68           MySQL5               Databases

69           MySQL5               Users

70           MySQL5               Database Backups

106        MySQL5               Max Database Size

107        MySQL5               Database Restores

108        MySQL5               Database Truncate

77           Exchange             Organization Disk Space, MB

78           Exchange             Mailboxes per Organization

79           Exchange             Contacts per Organization

80           Exchange             Distribution Lists per Organization

81           Exchange             Public Folders per Organization

83           Exchange             POP3 Access

84           Exchange             IMAP Access

85           Exchange             OWA/HTTP Access

86           Exchange             MAPI Access

87           Exchange             ActiveSync Access

88           Exchange             Mail Enabled Public Folders Allowed

420        Exchange             Allow Litigation Hold

421        Exchange             Recoverable Items Space

422        Exchange             Disclaimers Allowed

364        Exchange             Keep Deleted Items (days)

365        Exchange             Maximum Recipients

366        Exchange             Maximum Send Message Size (Kb)

367        Exchange             Maximum Receive Message Size (Kb)

368        Exchange             Is Consumer Organization

369        Exchange             Enable Plans Editing

424        Exchange             Allow Retention Policy

425        Exchange             Archiving storage, MB

426        Exchange             Archiving Mailboxes per Organization

428        Exchange             Resource Mailboxes per Organization

429        Exchange             Shared Mailboxes per Organization

580        Exchange             Journaling Rules Users

690        Exchange             Enable Forwarding of Email Address on Deletion

691        Exchange             Litigation Hold Duration (days)

693        Exchange             Enable Archiving on Mailbox Deletion

721        Exchange             Force Forwarding of Email Address on User Deletion

722        Exchange             Force Mailbox Archiving on User Deletion

100000  Exchange             Mailbox Rules Count

495        Hosted Organizations      Deleted Users

496        Hosted Organizations      Deleted Users Backup Storage Space, Mb

723        Hosted Organizations      Force User Data Archiving on Deletion

423        Hosted Organizations      Security Groups

205        Hosted Organizations      Organizations

206        Hosted Organizations      Users

207        Hosted Organizations      Domains per Organizations

230        Hosted Organizations      Allow to Change UserPrincipalName

231        Hosted Organizations      Locations Allowed

208        Sharepoint  Server           Max site storage, MB

200        Sharepoint  Server           SharePoint Site Collections

400        Sharepoint  Server           Use shared SSL Root

460        Hosted CRM       Max Database Size, MB

461        Hosted CRM       Limited licenses per organization

462        Hosted CRM       ESS licenses per organization

209        Hosted CRM       Full licenses per organization

210        Hosted CRM       CRM Organization

211        MsSQL2008         Databases

212        MsSQL2008         Users

213        MsSQL2008         Max Database Size

214        MsSQL2008         Database Backups

215        MsSQL2008         Database Restores

216        MsSQL2008         Database Truncate

217        MsSQL2008         Max Log Size

218        MsSQL2012         Databases

219        MsSQL2012         Users

221        MsSQL2012         Max Database Size

222        MsSQL2012         Database Backups

223        MsSQL2012         Database Restores

224        MsSQL2012         Database Truncate

225        MsSQL2012         Max Log Size

463        Hosted CRM2013             CRM Organization

464        Hosted CRM2013             Max Database Size, MB

465        Hosted CRM2013             Essential licenses per organization

466        Hosted CRM2013             Basic licenses per organization

467        Hosted CRM2013             Professional licenses per organization

300        VPS        Number of VPS

301        VPS        Allow user to create VPS

302        VPS        Number of CPU cores

303        VPS        Boot from CD allowed

304        VPS        Boot from CD

305        VPS        RAM size, MB

306        VPS        Hard Drive size, GB

307        VPS        DVD drive

308        VPS        External Network

309        VPS        Number of External IP addresses

310        VPS        Private Network

311        VPS        Number of Private IP addresses per VPS

312        VPS        Number of Snaphots

313        VPS        Allow user to Start, Turn off and Shutdown VPS

314        VPS        Allow user to Pause, Resume VPS

315        VPS        Allow user to Reboot VPS

316        VPS        Allow user to Reset VPS

317        VPS        Allow user to Re-install VPS

318        VPS        Monthly bandwidth, GB

553        VPS2012              Number of VPS

554        VPS2012              Allow user to create VPS

555        VPS2012              Number of CPU cores

556        VPS2012              Boot from CD allowed

557        VPS2012              Boot from CD

558        VPS2012              RAM size, MB

559        VPS2012              Hard Drive size, GB

560        VPS2012              DVD drive

561        VPS2012              External Network

562        VPS2012              Number of External IP addresses

563        VPS2012              Private Network

564        VPS2012              Number of Private IP addresses per VPS

565        VPS2012              Number of Snaphots

566        VPS2012              Allow user to Start, Turn off and Shutdown VPS

567        VPS2012              Allow user to Pause, Resume VPS

568        VPS2012              Allow user to Reboot VPS

569        VPS2012              Allow user to Reset VPS

570        VPS2012              Allow user to Re-install VPS

571        VPS2012              Monthly bandwidth, GB

572        VPS2012              Allow user to Replication

345        VPSForPC             Number of VPS

346        VPSForPC             Allow user to create VPS

347        VPSForPC             Number of CPU cores

348        VPSForPC             Boot from CD allowed

349        VPSForPC             Boot from CD

350        VPSForPC             RAM size, MB

351        VPSForPC             Hard Drive size, GB

352        VPSForPC             DVD drive

353        VPSForPC             External Network

354        VPSForPC             Number of External IP addresses

355        VPSForPC             Private Network

356        VPSForPC             Number of Private IP addresses per VPS

357        VPSForPC             Number of Snaphots

358        VPSForPC             Allow user to Start, Turn off and Shutdown VPS

359        VPSForPC             Allow user to Pause, Resume VPS

360        VPSForPC             Allow user to Reboot VPS

361        VPSForPC             Allow user to Reset VPS

362        VPSForPC             Allow user to Re-install VPS

363        VPSForPC             Monthly bandwidth, GB

370        Lync       Users

371        Lync       Allow Federation

372        Lync       Allow Conferencing

373        Lync       Maximum Conference Particiapants

374        Lync       Allow Video in Conference

375        Lync       Allow EnterpriseVoice

376        Lync       Number of Enterprise Voice Users

377        Lync       Allow National Calls

378        Lync       Allow Mobile Calls

379        Lync       Allow International Calls

380        Lync       Enable Plans Editing

381        Lync       Phone Numbers

382        Lync       Skype Groups per Organization

383        Lync       Skype Queues per Organization

384        Lync       Skype Workflows per Organization

430        EnterpriseStorage            Disk Storage Space (Mb)

431        EnterpriseStorage            Number of Root Folders

450        RDS        Remote Desktop Users

451        RDS        Remote Desktop Servers

491        RDS        Remote Desktop Servers

468        RDS        Use Drive Maps

470        MsSQL2014         Databases

471        MsSQL2014         Users

472        MsSQL2014         Max Database Size

473        MsSQL2014         Database Backups

474        MsSQL2014         Database Restores

475        MsSQL2014         Database Truncate

476        MsSQL2014         Max Log Size

724        Service Levels    Require Service Level on User Creation

550        Sharepoint Enterprise Server       SharePoint Site Collections

551        Sharepoint Enterprise Server       Max site storage, MB

552        Sharepoint Enterprise Server       Use shared SSL Root

600        MicrosoftOnlineServices                Office 365 verified domains

601        MicrosoftOnlineServices                Office 365 synchronized users

670        MicrosoftOnlineServices                Office 365 synchronized groups

680        MsSQL2016         Databases

681        MsSQL2016         Users

682        MsSQL2016         Max Database Size

683        MsSQL2016         Database Backups

684        MsSQL2016         Database Restores

685        MsSQL2016         Database Truncate

686        MsSQL2016         Max Log Size

101000  System  Allow update on the Update Dashboard

Returns AddHostingPlanResult object that contains created hosting plan ID or error code and
exceeding quotas if any.

 

DeleteHostingPlan (int planId) – deletes a hosting plan. Returns DeleteHostingPlanResult object that that contains 0 status code if hosting plan deleted successfully or error code.
Endpoint: http://<Enterprise Server URL>/esPackages.asmx

 

UpdateHostingPlan (HostingPlanInfo plan) – update a hosting plan.
Endpoint: http://<Enterprise Server URL>/esPackages.asmx

All parameters are the same as AddHostingPlan

 

AddHostingAddon (HostingPlanInfo plan) – adds a hosting addon.
Endpoint: http://<Enterprise Server URL>/esPackages.asmx
The “plan” parameter requires the following fields to be set:
PlanId – ID of the hosting addon you wish to add;

PlanName – Name of the addon plan;

PlanDescription – Description of the hosting addon;

IsAddon – must be set to “true”;

UserId – ID of the user that owns addon;

Groups –  HostingPlanGroupInfo array;

Quotas –  HostingPlanQuotaInfo array;

 

DeleteHostingAddon (int planId) – deletes a hosting addon. Returns DeleteHostingAddonResult object that that contains 0 status code if hosting addon deleted successfully or error code.
Endpoint: http://<Enterprise Server URL>/esPackages.asmx

 

UpdateHostingAddon (HostingPlanInfo plan) – update a hosting addon.
Endpoint: http://<Enterprise Server URL>/esPackages.asmx

All parameters are the same as AddHostingAddon.

 

Calling MSPC Web Service from PHP

The following sample code adds a new user to MSPC database. NuSOAP library is used to work
with web services from PHP:
<?php
require_once ("nusoap/lib/nusoap.php");
/* Set address of Enterprise Server web service */
$WSP = new soapclient('http://127.0.0.1:9002/esUsers.asmx?WSDL', true);
$WSP->soap_defencoding = 'utf-8';
/* Set credentials - this is MSPC login*/
$WSP->setCredentials("serveradmin", "serveradmin");
/* specify method parameters */
$param = array("username" => "serveradmin");
/* call web method */
$result = $WSP->call('UserExists', array('parameters' => $param),
'http://smbsaas/MSPC/enterpriseserver',
'http://smbsaas/MSPC/enterpriseserver/UserExists');
/* process results */
if ($WSP->fault) {
echo '<h2>Fault </h2><pre>'; print_r($result); echo '</pre>';
} else {
$err = $WSP->getError();
if ($err) {
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>';
}
}
echo '<h2>Request</h2><pre>' . htmlspecialchars($WSP->request, ENT_QUOTES) .
'</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($WSP->response, ENT_QUOTES)
. '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($WSP->debug_str, ENT_QUOTES) .
'</pre>';
?>

MSPC Integration API 

 

Introduction

This document describes full MSPC Integration API that could be used in 3rd-party
applications.

Requirements

· WSE 3.0 or Basic Authentication
· Each API call should have user’s credentials provided

Basic Authentication

For interacting with MSPC API you should use Basic Authentication. MSPC recognizes
“Authorization” header with the user credentials provided in the following format: username:password.

Web Services

Applications installer
Audit Log
Authentication
Backup
BlackBerry
Comments
CRM
Database Servers
Enterprise Storage
Exchange Online
Exchange Server
Files
Ftp Servers
HeliconZoo
Hosted SharePoint Servers
Hosted SharePoint Servers Enterprise
Import
Lync
Mail Servers
Microsoft Online Services (O365)
OCS
Operating Systems
Organizations
Packages
Password Filter
Regional Data
Remote Desktop Services
Scheduler
Servers
SharePoint Servers
Statistics Servers
Storage Spaces
System
Tasks
Users
Virtualization Server
Virtualization Server 2012
Virtualization Server For Private Cloud
Web Application Gallery
Web Servers

©2024 MSPControl | Privacy Policy

Log in with your credentials

or    

Forgot your details?

Create Account