...
HTML |
---|
<div id="google_translate_element"></div> <script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element'); } </script> <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |
...
Making
...
APIv1 Requests
API requests can be generated within the web UI by the API Request Generator, or generated programmatically in any language.
An API request looks like this:
https://cloud.6connect.com[your instance]/ex/api/v1/api.php?target=ipam&action=get&type=IP&mask=24
An API response is a JSON-encoded text string, and looks like this:
...
Instructions on decoding this return data can be found in the API endpoint documentation pages.
Expand |
---|
Using API Keys: https:// |
...
[your instance]/ex/api/v1/api.php?target=ipam&action=get&type=IP&mask=24&apiKey= |
...
00- |
...
TMHQV8CV2XZYABCD&hash=8jxj4IApYmgb5IZ0wBY4tFv+WilXb5JuVpjrwupyXQo= API Keys can be generated from your ProVision instance by navigating to the Admin panel by using the gear icon in the upper right hand corner, then navigating to the API tab. The API tab will present the API authentication information in the following format: API Key: |
...
00- |
...
TMHQV8CV2XZYABCD Secret Key: |
...
6e04e5822ce10fecc8947dedxc46878 The secret key serves as an API password and is used in the creation of the API Authentication hash. The formula for creating a API query hash from an API query and a Secret Key is the following: Hash = Base64Encode( Sha256HMACHash ( QueryString, SecretKey ) ) In PHP, this would be performed with the following line of code: $hash = base64_encode(hash_hmac('sha256', $_SERVER['QUERY_STRING'], $secretKey, TRUE));
Other Languages The 6Connect API can be used in just about any scripting or programming language. We have a PHP SDK that provides example code, and several useful functions for interacting with the API. Even if you don't want to use PHP, the samples will help you create code in other languages |
Note |
---|
A Note on False Positives ProVision utilizes several possible authentication schemes of which key-based API authentication is only one. Session-based, username/password authentication is used for the majority of user interaction with the ProVision front end. Because session information is stored in browsers cookies, a browser can be authenticated to execute API commands as long as the session is active. Unfortunately, this can lead to confusion when using a machine-based API as the user might use an authenticated browser session to test API-Key based API queries. These queries will always succeed regardless of whether the API Query Hash was calculated correctly as the system defaults to Session-based authentication when it is available. To ensure that session-based authentication is not polluting your API-Key based testing, always use a separate browser which is not logged in to your ProVision instance to test API queries. |
Other Languages
The 6Connect API can be used in just about any scripting or programming language. We have a PHP SDK that provides example code, and several useful functions for interacting with the API. Even if you don't want to use PHP, the samples will help you create code in other languages.