1.17 Web API
WebPortal API
The VS.WebAPI.Admin was designed to enable creating your own portals or integrating with your own CRM applications.
Default application name: PortalWebAPI
Default url at which application is installed: http://ip_address_or_dns/VS.WebAPI.Admin/
To find out what version of WebPortal API was installed enter the following url:
http://ip_address_or_dns/VS.WebAPI.Admin/api.test
In the result the version will be returned as shown on Fig 1.
To get information about each available method in the API enter the following url:
http://ip_address_or_dns/VS.WebAPI.Admin/Docs/index.html for html generated documentation
http://ip_address_or_dns/VS.WebAPI.Admin/metadata for automated documentation
The WebPortal API built-in help guide provides useful information about each available method in the API. Once the url http://ip_address_or_dns/VS.WebAPI.Admin/Docs/index.html is opened a full list of methods is presented as in Fig 2. To view the details of a selected method select it from the left menu; in main window additional information will be shown as in the example method in Fig 3.
The example method AdminGetTariffName (Fig 3) provides information about the list of available attributes in the Members tag:
- CurrencyId
- Name
- PageOffset
- PageSize
In Remarks it provides information that the method returns: Return tariffs. Also, requirements are shown: Require admin authentication.
The service allows you to communicate in HTTP POST and for selected methods in GET. It is recommended to use JSon format. To access API methods authorization is required. An API client can log in to each method separately or to use session information. Login by default is turned on with passwords hashed in SHA1. The account for authorization is taken from VSM module Users as shown in Fig 4. To pass login information it is required to add the #admin suffix, e.g api_login#admin.
List of all methods available for:
Various examples of usage:
PHP - Zend:
PHP - Drupal:
C#:
HTTP (fiddler):
PHP (Without frameworks):
Soap 1.2 in PHP (Not recommended, better use JSon):
See also
Figures
Click on a thumbnail to enlarge image
Fig. 1 - How to check WebPortal API versions
Fig. 2 - Full list of available methods
Fig. 3 - Details of selected method
Fig. 4 - API account information for authentication