SmarterStats 3.x Help
This documentation is for a product that is no longer supported by SmarterTools.

SmarterStats Web Services

SmarterStats was built with custom configuration in mind. In addition to being able to customize the look and feel of SmarterStats, developers and/or System Administrators have the ability to code to the SmarterStats application using several different web services. These web services allow developers and/or System Administrators to automate a variety of different things: add sites to the Web Interface on the fly, grab site-specific bandwidth usage for billing purposes, set details on a specific site or server, update site information, test servers added to the Web Interface, and more.

To view the web services, and their corresponding functions, available to you, go to your default Web Interface install location and append "services/services_page.asmx". Your particular SmarterStats location can be the specific IP address of the Web Interface (e.g. if you installed SmarterStats with the default installation you would use http://127.0.0.1:9999/services/SiteAdmin.asmx, etc. or a specific IP address you assigned for the Web Interface if you custom-installed SmarterStats or moved SmarterStats to a new web server) or a specific site name if you configured SmarterStats as an actual website within IIS (e.g. smarterstats.yourdomain.com). Below you will find a brief explanation of the web services available to you, along with the default installation paths to the specific web services details page.

Server Admin Web Service

http://127.0.0.1:9999/services/serveradmin.asmx

There are six (6) functions of the service available for customization. These services allow developers and/or System Administrators to pull information relating to a server or servers from a custom page using SOAP, an HTTP GET command, or an HTTP POST command (examples for each are provided as well). The functions, and their corresponding properties, are:

  • GetServers - returns a list of all servers running SmarterStats Enterprise Edition .
  • GetGlobalDefaults - returns the global default settings for a specific server. These default settings include server IP address, server status, default file, document and download extensions, and more.
  • PingServer - allows you to ping a specific server and see the results.
  • DeleteServer - allows you to delete a server from the Web Interface.
  • AddServer - allows you to add a server directly in to the Web Interface.
  • UpdateServer - allows you to change server configurations on the fly.

Site Admin Web Service

http://127.0.0.1:9999/services/siteadmin.asmx

There are nine (9) functions of the service available for customization. These services allow developers and/or System Administrators to pull information relating to a particular site or sites from a custom page using SOAP, an HTTP GET protocol, or an HTTP POST command (examples for each are provided as well). Constants for these web services can be found here. These functions, and their corresponding properties, are:

  • AddSite - allows you to add sites to the Web Interface on the fly.
  • DeleteSite - allows you to delete a site from the Web Interface on the fly.
  • GetAllSites - returns a listing of all sites being monitored by the Web Interface.
  • GetSitesForServer - returns sites from a particular Server ID.
  • moveSite - allows you to initiate a move command to the service for a particular site. This would allow you to automate moves within a control panel application.
  • getSiteStatus - allows you to check the site status for a particular Site ID.
  • UpdateSite - allows you to update information pertaining to a particular site that resides in the Web Interface.
  • AddSiteWithFTP - Allows you to add a site with FTP logs directly in to the Web Interface.
  • GetSite - returns a single site that you specify and that is listed in the Web Interface.

Bandwidth Web Service

http://127.0.0.1:9999/services/bandwidth.asmx

There are two (2) functions of the service available for customization. These services allow developers and/or System Administrators to pull information relating to bandwidth usage for a particular site or server from a custom page using SOAP, an HTTP GET command, or an HTTP POST command (examples for each are provided as well). These functions can be extremely useful when providing bandwidth statistics to end users or for bandwidth monitoring and overage billing. The functions, and their corresponding properties, are:

  • GetForSite - returns all bandwidth for a particular site.
  • GetForServer - returns all bandwidth for a particular server on a per-site basis.

Product Information Web Service

http://127.0.0.1:9999/services/productinfo.asmx

There are four (4) functions of the service available for customization. These services allow developers and/or System Administrators to pull information (e.g. licensing info) or set information (e.g. license activation) relating to the product installed on the server from a custom page using SOAP, an HTTP GET command, or an HTTP POST command (examples for each are provided as well). The functions, and their corresponding properties, are:

  • ActivateLicenseKey - allows you to activate the license key purchased for your product.
  • GetLicenseInfo - returns information pertaining to the current product license.
  • GetProductInfo - returns information pertaining to the currently installed product.
  • SetLicenseKey - sets a license key for the Web Interface.

User Administration Web Service

http://127.0.0.1:9999/services/useradmin.asmx

There are seven (7) functions of the service available for customization. These services allow developers and/or System Administrators to perform various user functions, such as user creation and deletion, updating user information, retrieving user informatin and more from a custom page using SOAP, an HTTP GET command, or an HTTP POST command (examples for each are provided as well). The functions, and their corresponding properties, are:

  • AddUser - automatically add users to a specific site.
  • SetSiteOwner - set site ownership for a specific site to a specific user.
  • GetUser - returns a user for a particular site.
  • ValidateLogin - returns login results for a particular user.
  • GetUsers - returns all users for a specific site.
  • UpdateUser - updates user information for a site.
  • DeleteUser - deletes the specified user from a site.