External Parameters
Last updated
Last updated
You can send external parameters to the dashboards embedded in your application. These parameters can be sent either directly to the parameters within the report or as hidden parameters (e.g., tenantId).
To send parameters, you can include them in the {Params} field of the embed URL in JSON format as key-value pairs.
For example:
Let's say we have a dashboard with a parameter called "Start Date" (the programmatic name of the parameter is startDate
).
To populate this parameter externally via embedding, we need to structure the embed URL as follows:
In some cases, there may be a need to send static parameters that should not be filled in from the screen (e.g., tenantId). For such situations, you can add an "External Parameter" to the dashboard and use it. This type of parameter is not shown to the user but is filled in the background and can be used in the queries within the dashboard.
Example usage:
Let’s assume we have a row-based tenantId mechanism in a multi-tenant application. We want the dashboards in Reportql to work based on a tenantId value provided externally. For this situation:
Add an "External Parameter" named TenantId to the dashboard.
To populate this parameter externally via embedding, we need to structure the embed URL as follows:
You can then use the @tenantid parameter in your queries. For example: