Every API request must include an authentication code that identifies and authenticates the user against the proper realm within the platform. This is identified in the WebServices as the license or key. The license file is a plain-text ASCII string that appears to XML with three elements.
- Version: version identifier, used to support different types of encryption and updates to the encoding method.
- Encryption key: The key is a unique authentication token for the realm.
- Encrypted data: The data block contains other information required by the API, including host information so the API will know which system to communicate with.
Changing the license file invalidates any files or API calls using the old key. If the license already exists and you regenerate it, make sure to notify everyone using the WebServices API.
To generate the license:
- Login to the platform and then go to CUSTOMER CENTER > API MANAGEMENT > SETUP API. You must have the API feature enabled in your realm in order to use it. If you do not see an option to Setup your API, please contact support.
- In versions later than v15.01.00, select the API Client*.
- Click Generate License File. The page will refresh and display a message indicating the license file will be emailed to the email account with which you logged in.
- When you receive the email, copy the specified portion of text and paste it into a new file.
- Save the file somewhere your application (and the API) will be able to read it.
Sample License/Key File
The license file may appear on one, long line. The API removes all new lines and carriage returns when it reads this file, so any particular formatting style is irrelevant.
<version>1</version> <key>CD4671A6A61A7DEF3939FE9BADFC6BF</key> <data>F43D1956D399EB74EEF61074F4669671014641BAB6B3F1EE97ADC59956656C74EBBB661FADA6BFCB5730E33C74A611DFD74E6BC4FBCDC5B6E6905C9994C4FCED54C74A11BEFE396BDC61BDB6407F0A5E</data>
JAVA and WSDL
The API is available as a web service via SOAP or XML-RPC messaging. A downloadable Java client library contains client stub files that make using the API very easy for Java users. For .NET and other clients, the WSDL file that describes the API SOAP interfaces in a standard XML format can be read from:
http://[siteURL]/wsdl/WhatCountsAPI.wsdl
Where [siteURL] is the domain you use to access your system.
*API Client coming in Q1 2020*