Embedding DigDash in Web Sites URL Parameters

Last modified by Aurelie Bertrand on 2023/11/13 16:45

Introduction

DigDash can be embedded at multiple “levels” in external websites:

  • Dashboard
  • Dashboard page
  • Information Flow

In this document we will present url that works in the following context:

  • Server name: ddsrv
  • Port: 8080
  • DigDash Domain: ddenterpriseapi
  • DigDash Dashboard Domain: digdash_dashboard

Dashboard

At this level you can embed multiple pages in an iframe.

URL : http://ddsrv:8080/digdash_dashboard/index.html

Available parameters:

  • login=<user> User to authenticate
     
  • pass=<password> Password for the user
  • domain=<domainname> DigDash Enteprise domain name
     Example: ddenterpriseapi
  • server=<server URL> DigDash Enterprise domain server URL
     Example : http://localhost:8080
  • hideBanner=<true|false> Hide (true) or show (false) the main title bar
  • hideFilters=<true|false> Hide (true) or show (false) the filter bar
  • <variableName>=<value> Specify a value for the variable variableName
  • <filterselection> See section V below

Example

http://ddsrv:8080/digdash_dashboard/index.html?server=http://localhost:8080&domain=ddenterpriseapi&login=user1&pass=pass1&hideBanner=true&hideFilters=true&var=1

Dashboard Page

At this level you can embed one page or all the pages of a dashboard role into an iframe

URL:

http://ddsrv:8080/digdash_dashboard/index.html?page=<user|role>[.<pagename>]

If you want one page you specify the page name otherwise you will get all the pages of the user or role selected.

Available parameters:

  • page=<user|role>[.<pagename>] Page name prefixed by role or user name
  • login=<user> User to authenticate
     
  • pass=<password> Password for the user
  • domain=<domainname> DigDash Enteprise domain name
     Example: ddenterpriseapi
  • server=<server URL> DigDash Enterprise domain server URL
     Example : http://localhost:8080
  • hideBanner=<true|false> Hide (true) or show (false) the main title bar
  • hideFilters=<true|false> Hide (true) or show (false) the filter bar
  • <variableName>=<value> Specify a value for the variable variableName
  • <filterselection> See section V below

Example

Information Flow

At this level you can embed one information flow (graphic component) of your information wallet into an iframe

URL: http://ddsrv:8080/ddenterpriseapi/viewflow?flowId=<flowid>

There is an easy way to get that URL for a specific flow from the information wallet configuration by clicking on “copy flow URL”

Available parameters:

  • flowId=<flow> Identifier for the flow to display
  • user=<user> User to authenticate
     
  • pass=<password> Password for the user
  • hideFilters=<true|false> Hide (true) or show (false) the filter bar
  • <variableName>=<variableValue> Specify the value of variable variableName
  • <filterselection> See section V below

Example:

http://ddsrv:8080/ddenterpriseapi/viewflow?flowId=2340fd0&user=user1&pass=pass1&hideFilters=true&var=1

Filters

You can specify pre-defined filters when for your iframe integration by setting some dimension filter parameters.

Filters are on the form:

DimensionName=FilterValue

If the dimension contains one or more Hierarchies you can select the desired Hierarchy and Level by adding

HDimensionName=HierarchyName

LDimensionName=LevelName

Example

http://ddsrv:8080/ddenterpriseapi/viewflow?flowId=2340fd0&user=user1&pass=pass1&Geo=France&HGeo=Geography&LGeo=Country

Security Constraints

Some browsers, for example Chrome from its version 80, may refuse to process cookies that are coming from embedded webpages if the iframe site host is different than the embedding page.

The solution is to use an attribute SameSite=None on the cookie. This attribute must be set be the application container (Tomcat), or the HTTP front server (eg. Apache httpd). There are various available documents online to configure this cookie attribute. For tomcat's cookies : https://tomcat.apache.org/tomcat-9.0-doc/config/cookie-processor.html. On the Apache httpd side, the use of mod_headers module may be required.

However, the attribute SameSite can not be set on an non-secure cookie. So the Secure attribute must be set as well to be able to set SameSite=None. And the Secure attribute must be set only for HTTPS site.

So, consequently, embedding a DigDash Enterprise dashboard, or viewflow page, in an iframe, if the embedding page and the iframe have different hosts, will require to use an HTTPS connexion, and to configure cookie processing.

The following Mozilla document this requirements : https://developer.mozilla.org/fr/docs/Web/HTTP/Headers/Set-Cookie/SameSite