Use this option to securely embed dashboards where you can filter the data based on encrypted parameters (using your customer key). This ensures that the request is not tampered with.
Steps:
-
Contact us to obtain a customer key.
-
Use this key to AES encrypt your request parameters. Users can generate the key (secure hash) with or without parameters. To include a parameter: include contentFilters as a parameter.
Parameters: contentFilters
Example: contentFilters=[{"fieldName":"opened","values":[1000],"operator":">"}]
Please contact support@knowi.com for assistance with AES encryption and/or sample code.
-
Use the Share settings in the dashboard, and click 'Generate Secure URL' to generate an embeddable URL.
-
Build the URL with the generated hash in step 2 at runtime. Embed into an iFrame inside your portal (or use the JavaScript API). Example: https://www.knowi.com/share/secure/VyqOBEBfyKt7ZUzLyH68Vm3lT34NisUIYM1VOis0IpI38ie/{secureHash}
Example Javascript Usage:
<HEAD>
<script src="https://www.knowi.com/minify/knowi-api.min.js"></script>
<!-- *********** Edit here *********** -->
<script>
function loadChart() {
Knowi.render('#knowi-div', {
type: 'secure',
hash: "rcf9rdm6zTDd6KIz9EblkO0e0BfEFF0SCjH9RABg=",
dashboard: "4kjl45kipgqULyXaT5fAUD3ipIypbipPNq2wm6D197pJKCnQnTx",
view: {
title: true,
border: true,
header: true,
backgroundColor: "lightblue",
setting: true
}
}, function () {
});
}
</script>
</HEAD>
<BODY onload="loadChart()">
<div id="knowi-div"></div>
</BODY>
</HTML>
Link Expiry
You can also specify an expiration time for a given request so that the link with the same parameters cannot be reused. To add an expiry, pass in the following two parameters to the request before the encryption routine:
Current Epoch Time: _t in milliseconds
Expiry in milliseconds: _ttl (default is 60 seconds if _t is present without _ttl).
Example URL before passing it through the hashing/encryption routine: contentFilters=[{"fieldName":"opened","values":[1000],"operator":">"}]&_t=1537661183&ttl=30
Changing the Default Timezone
Users can change the default timezone to any of the required timezone. By default, the timezone is set to the dashboard creator's timezone. Here is a list of time zones supported by Knowi. To change the timezone in the secure hash URL, append the _tz parameter at the end of the URL.
_tz=<timezone>
Note:
- The _tz parameter can be appended to a post-encrypted URL only.
- Make sure to append the _tz parameter after the ? symbol.
Examples:
https://knowi.com/share/secure/giiHglNJBQ0TZHzjG9f8XvpEMvruhisQFQk7V9UisMKllwie/LEr___2nqUZtopDswWtnxfRpTLTCaSdnRknTs3E9YTXwSA90P5VNc4dvm3T8FzDvycPBRvZXvg8X9YYGI1b17hzFqtPnbnlFPD___X+M+TGOJqlyXaD___A8+6aJfVwfNxpeVEWF6yGkingMJcug___lhWfhh1jqa12kN5p0xR___7FF191ic=?_tz=UTC
https://knowi.com/share/secure/giiHglNJBQ0TZHzjG9f8XvpEMvruhisQFQk7V9UisMKllwie/LEr___2nqUZtopDswWtnxfRpTLTCaSdnRknTs3E9YTXwSA90P5VNc4dvm3T8FzDvycPBRvZXvg8X9YYGI1b17hzFqtPnbnlFPD___X+M+TGOJqlyXaD___A8+6aJfVwfNxpeVEWF6yGkingMJcug___lhWfhh1jqa12kN5p0xR___7FF191ic=?_tz=America/New_York