Next Topic

Previous Topic

Book Contents

Sample API ASP Page

A test client ASP page is also distributed with the VSA API Web Service to help you familiarize yourself with the various API operations. You can use it to see how the ASP client was constructed and incorporate any part of its code into your own application. Users can browse to the actual /vsaWS/KaseyaWS.asmx page of any Kaseya Server, select a web method and copy and paste the exact XML SOAP request structure specified in the WSDL. 

Authentication is in its own frame at the top of the page. The sessionID from a successful authentication is exposed and can be copied and pasted in subsequent XML requests. 

Note: This page does not automatically incorporate the displayed sessionID into subsequent request statements like the Sample API C# Application does.

Example 1: Authentication

  1. Access the VSA API web service asp test client using http://<your-KServer>/vsaWS/TestClient/TestClient.asp
  2. Enter a valid VSA administrator UserName and Password and click Login.
  3. Select the Hashing Algorithm option to use. See Authenticate for details.

    Word 60% / HTML 100%

    The Session ID textbox is populated with the session ID generated by your logon. You will need to copy and paste this session ID into subsequent XML requests.

    Word 60% / HTML 100%

Example 2 - Creating a Get Request

  1. In a second browser window, use the /vsaWS/KaseyaWS.asmx page to select a method, such as GetLogEntry.

    Word 60% / HTML 100%

  2. Each method displays the XML SOAP structure for that method's request. Copy just the portion of the method's request structure that starts with <req> and ends with </req>.

    Word 60% / HTML 100%

  3. Paste the request structure into the Request pane of the TestClient.asp page. Enter the name of the method in the Web Method Name field. Replace the placeholder decimal with the sessionID string you obtained during authentication. Replace any other placeholder content with valid data as required. Then click the Send button.

    Note: The  <BrowserIP></BrowserIP> element in any method can be ignored. See Limiting Requests by IP Address and User for more information.

    Word 60% / HTML 100%

    The results display in the Response pane.