To configure the features and appearance of embedded objects, you can use special parameters which you provide in the link:
_autoupdate: Sets the auto-update time for dashboards and charts in seconds. By default, these are not updated automatically. The feature only works for the active browser tab. Objects due for auto-update on inactive tabs will be auto-updated when the tab becomes active again. The minimum values are:
30 seconds for dashboards.
15 seconds for charts.
_theme: Specifies the object's appearance. The possible values are:
light: Light theme.
dark: Dark theme.
_lang: In charts, sets the language of the menu that opens when you click . The possible values are ru or en.
Provide the parameters formatted as <parameter_name>=<value>. For example, to set the auto-update time to 50 seconds, specify _autoupdate=50.
Add this parameter to the object's address after the ? character before the hash with the token. You can provide them together with unsigned parameters. To provide multiple parameters, list them separated by & (ampersand).
In the left-hand panel, select Collections and workbooks.
Open the workbook with the object you want to embed.
At the top of the screen, click and select Keys for embedding.
In the window that opens:
Click Create key.
Enter the key name and click Create.
At the bottom, click Download key file or copy the key value.
Warning
After you close the window, all data from it will be lost.
The new key for embedding will appear in the list.
Configure the embedding for a private object:
Note
You can configure multiple embeddings for each object.
In the row with the object, click and select Embedding settings.
In the window that opens, click New embedding.
In the settings window, specify:
For a chart
For a dashboard
Name: Enter a name for the embedding.
Key: Select a previously created key for embedding.
Select Default parameters:
Enable all (default): All the unsigned parameters are enabled, unless explicitly disabled.
Disable all: All the unsigned parameters are disabled, unless explicitly enabled.
These restrictions do not apply to signed parameters from the token.
Optionally, Disabled parameters: Specify the names of unsigned parameters you want disabled when embedding a chart. Available in Enable all mode.
Optionally, Enabled parameters: Specify the names of unsigned parameters that can be provided in the embedding link. Any parameters not specified in the list will be ignored when attempting to provide them in the embedding link. Available in Disable all mode.
Optionally, Allow data export: Enable the display of the menu that allows you to export the chart data. To export data, hover over the chart, click → Save as in its top-right corner, and select the format: XLSX, CSV, or Markdown.
Name: Enter a name for the embedding.
Key: Select a previously created key for embedding.
Optionally, Disabled parameters: Specify the names of unsigned parameters you want disabled when embedding a dashboard. These restrictions do not apply to signed parameters from the token. By default, you can provide any parameters in the embedding link. If they are specified in the dashboard settings, they can affect charts and selectors.
Note
If there are selectors with restricted parameters on the dashboard, those will not be available when embedding.
Optionally, Allow data export: Enable the display of the menu that allows you to export the chart data. To export data, hover over the chart, click → Save as in its top-right corner, and select the format: XLSX, CSV, or Markdown.
Click Create. In the ID column, copy the ID of the object to embed, and then click Close.
Create a token:
Prepare a payload for the token, i.e., information about the object to embed. The payload contains the following fields:
exp: Token expiration time in Unix Timestamp format.
Warning
Tokens with more than 10 hours between exp and iat are invalid.
dlEmbedService: Service ID string constant, ENTERPRISE_DATALENS_EMBEDDING_SERVICE_MARK.
(Optional) params: Signed chart parameters provided as part of the token. They cannot be changed without regenerating the token.
Warning
The generated token is transmitted as part of the network request header, so its maximum size is limited to 30 KB. Keep this in mind when using signed parameters.
For correct operation, use only a string or an array of strings as parameter values.
As a result, queries from your dashboard or chart will be signed with the new token. The dashboard or chart will automatically get updated if you changed the signed parameters in your new token.
By default, any parameters, except those explicitly disabled, can be provided in the embedding link. They should be specified in the URL before the token hash. This allows you to change some widget/dashboard parameters on the client side without recreating the token.
For example, where a chart or dashboard employs the from and/or to parameters to filter values by time, you can provide these parameters in the embedding link before the token hash:
Signed parameters are provided as part of the token. They cannot be changed without regenerating the token. For correct operation, use only a string or an array of strings as parameter values.
Embedding settings for enabled and disabled parameters do not apply to signed parameters. They will be provided to charts and selectors in any case.
Signed parameters take priority. If a widget gets both a signed and an external parameter of the same name at the same time, the signed one will apply.
Signed parameter selectors do not affect the dashboard charts.
Signed parameters ensure more secure data access: users with access to embedded objects are unable to change these parameters. You can use signed parameters to filter charts and provide a specific user with only the slice of data they need.
When embedding dashboards, consider the following:
Embedded dashboards can be opened only in view mode. Their navigation bar and, by default, the menu for charts are hidden. Enable Allow data export in embedding settings for your charts to display the menu, which allows exporting the chart data.