Periscope Data Documentation

Connecting to Periscope

First Time Connecting

Connection Definitions

Common Connection Errors

Private Network SSH Tunnels

Integrations

Overview

Getting Started

Keyboard Shortcuts

Charts & Dashboards

Chart Overview

Chart Options

Dashboard Overview

Refresh Mechanics

Organizing Charts

Organizing Dashboards

Table-like Charts

Table Overview

Cohort Grids

Pivot Tables

Graph-like Charts

Overview & General Settings

Chart Types and Settings

Mixing Chart Types

Map Charts

Map Chart Overview

Heatmaps

Clusters and Bubbles

Satellite Maps

GeoJSON

Other Charts & Customizations

Pie Charts

Image Charts

Chart Annotations

Site Administration

Adding Users

Removing Users

User Types

User Groups

Two-Factor Authentication

Managing User Permissions

Dashboard Permissions

Site Preferences

Periscope Cache

Caching Strategies

Querying the Periscope Cache

Cross-Database Joins

CSV Upload

Materializing Views

SQL Formatters

Using SQL Formatters

Composing SQL Formatters

Dollars and Percentages

Time Zone Formatters

Date Aggregation

Date Parts

Basic Filters

Custom Filters

Date Range Filters

Aggregation Filter

Adding, Moving, and Hiding Filters

Advanced Filters

Default Filters

Drilldowns

Parent-Child Filters

Matching Filter Values

Time Zone Conversions

Direct Replacement

User Friendly Names

Views

SQL Views

Joining to Views

More SQL Tools

SQL Snippets

Parameterized SQL Snippets

SQL Alerts

Automatic Joins

Sharing and Embedding

Sharing Dashboards Externally

Email Reports

Easy Embedding

Embed API

Embed API Options

Public CSV URL

Slack API

Slack Linking Reports

Data Management

Adding and Deleting Datasource

Spaces: Data-Level Permissions

Improving Query Throughput

Revoking Table Permissions

Salesforce Datasource

SSO Integrations

Overview

Okta

OneLogin

Google Apps

Embed API

To view this documentation for the Periscope Classic UI, click here.

Programmatically Embedding Dashboards

Periscope's Embed API allows the user to programmatically specify filters and their values in the URL when embedding dashboards.

The embed API URLs take the following form:

https://www.periscopedata.com/api/embedded_dashboard?data={data}&signature={signature}

Encoding the Data

The data to specify the embed's parameters is a URL-encoded JSON blob. You can find our documentation on the various options available to the embed API here. For this example, the blob should look like:

{
    "dashboard": 7863,
    "embed": "v2",
    "filters": [{"name": "Filter1", "value": "value1"}, {"name": "Filter2", "value": "1234"}]
}

The data should be URL-encoded. The above blob URL-encodes to:

%7B%22dashboard%22%3A7863%2C%22embed%22%3A%22v2%22%2C%22filters%22%3A%5B%7B%22name%22%3A%22Filter1%22%2C%22value%22%3A%22value1%22%7D%2C%7B%22name%22%3A%22Filter2%22%2C%22value%22%3A%221234%22%7D%5D%7D

Signing the Request

The API key is required to calculate the signature. The administrator can see it in the Site Settings tab of gear menu in the upper right-hand corner of Periscope:

The signature is the hex-encoded SHA256-HMAC of the API key and the URL path, including the data. For the URL, the string to encode is:

/api/embedded_dashboard?data=%7B%22dashboard%22%3A7863%2C%22embed%22%3A%22v2%22%2C%22filters%22%3A%5B%7B%22name%22%3A%22Filter1%22%2C%22value%22%3A%22value1%22%7D%2C%7B%22name%22%3A%22Filter2%22%2C%22value%22%3A%221234%22%7D%5D%7D

For this example, use a sample API key of e179017a-62b0-4996-8a38-e91aa9f1.

Given this API key and this path, the hex(sha256_hmac(key, path)) is:

adcb671e8e24572464c31e8f9ffc5f638ab302a0b673f72554d3cff96a692740

Thus, the final request is:

https://www.periscopedata.com/api/embedded_dashboard?data=%7B%22dashboard%22%3A7863%2C%22embed%22%3A%22v2%22%2C%22filters%22%3A%5B%7B%22name%22%3A%22Filter1%22%2C%22value%22%3A%22value1%22%7D%2C%7B%22name%22%3A%22Filter2%22%2C%22value%22%3A%221234%22%7D%5D%7D&signature=adcb671e8e24572464c31e8f9ffc5f638ab302a0b673f72554d3cff96a692740