Use this option to securely embed dashboards (or widgets) where you can filter the data based on parameters that are encrypted (using your customer key). This ensures that the request is not tampered with.
Steps:
1. Get the Key from the SSO settings under the User/Customer settings.
2. Use the key to AES encrypt your request parameters. Include _contentFilters_ as a parameter (mandatory).
Example: contentFilters=[{"fieldName":"opened","values":[1000],"operator":">"}]
Please contact support@knowi.com for assistance with AES encryption and/or sample code.
3. Use the Share settings in the dashboard (or widget), and click on 'Generate Secure URL' a generate an embeddable URL.
4. Build the URL with the generated hash at in step 2 at runtime. Embed into an iFrame inside your portal or use the JavaScript API.
Example iFrame URL: 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 a time to expire 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 prior to the encryption routine:
Current Epoch Time: _t
Expiry in seconds: _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