Secure Sharing & Embedding

External sharing

You can share your dashboard and charts with preset filters with non-Silota users. The public URL generated is signed with your API key, and so it's not possible to modify the URL without invalidating the signature.

First, make sure you have set your desired filters. Then pick the "Share with Filters" option from the drop down.

How sharing works

https://console.silota.com/s/<dashboard_id>/?{filters}&signature={signature}

The generated URL has two parts to it:

  • filter parameters
  • signature

The filter parameter is a URL encoded JSON blob with the following structure:

{
  dateAggregation: "monthly|quarterly|etc.";
  dateRange: {

  },
  filters: [
    {
      name: "FilterName",
      value: "FilterValue"
    },
    ...
  ]      
}

The signature is a SHA256-HMAC of the API key and the complete URL path, including the JSON blob.

Javascript Example

We make use of hash.js to generate our signatures.

var hash = require('hash.js');
var sha256 = hash.hmac(hash.sha254, api_key);
var filters = {
  ...
};

var url = "/s/" + dashboard_id + "/?"
    + encodeURIComponent(JSON.stringify(filters));

var signature = sha256.update(url).digest('hex')

var final_url = "https://console.silota.com/"
    + url
    + "&signature=" + signature;

Python Example

import json, hmac, hashlib, urllib
api_key = "MY_API_KEY"
dashboard_id = "MY_DASHBOARD_ID"
filters = {
  ...
}
encoded = urlib.urlencode(json.dumps(url))
url = '/s/' dashboard_id + "/?" + encoded

signature = hmac.new(api_key, msg=url, digestmod=hashlib.sha256).hexdigest()

final_url = 'https://console.silota.com' + url + '&signature=' + signature

Next Generation SQL Data Analysis Write SQL, visualize data, and share your results. Onboarding forward-thinking teams now:

No spam, ever! Unsubscribe any time. Learn more about the product.