All Products
Search
Document Center

:Embed a report into a third-party system

Last Updated:Jul 03, 2023

Quick BI allows you to embed reports that are created in group workspaces into other systems. This way, Quick BI can be integrated with other application systems. This facilitates service integration. In Quick BI, reports include dashboards and workbooks. This topic describes how to embed a report into a third-party system.

Step1: Obtain the access token by making an HTTPS API request

In the example described in this topic, a dashboard that is created in a group workspace is used.

  • If your Quick BI account has the developer or analyst permissions on a group workspace, the account can be granted the permissions only on the dashboards that are created by the account in the group workspace.

  • If your Quick BI account has the administrator permissions on a group workspace, the account can be granted the permissions on all dashboards in the group workspace.

  1. Obtain the AccessKey ID and the AccessKey secret of your Quick BI account.

    1. After you log on to the Quick BI console.

    2. To obtain the AccessKey ID and the AccessKey secret, perform the steps that are shown in the following figure.

      获取AK_intl
  2. Obtain the Alibaba Cloud ID.

    • If you are using an Alibaba Cloud account, the Alibaba Cloud ID is displayed in the Account Center.

      On the Security Settings page, obtain the value of the Account ID field. This value is used as the Alibaba Cloud ID.

      账号ID
    • If you are using a RAM user, the Aliyun ID is the name of the primary account: RAM user.

      Assume that the Alibaba Cloud account is named test and the RAM user is zhangsan@xxx123.xxaliyun.com. The Aliyun ID is test:zhangsan.

      Note

      You can contact the administrator to obtain the Alibaba Cloud account to which the RAM user belongs.

  3. Obtain an access token.

    Set the accessId, accessKey, and aliyunId parameters in the following request URL to the AccessKey ID, AccessKey secret, and Alibaba Cloud ID that are obtained in the previous steps. Then, send a GET request to obtain an access token.

    https://das.base.shuju.aliyun.com/api/ac3rdservice/token.json?accessId=xxx&accessKey=xxx&aliyunId=xxx&validityTime=60

    If true is returned for success, the access token is obtained. In this case, the value of the accessToken is the token. 1

    Note

    If you send a request to obtain or access a report before the access token expires, the validity period of the access token is automatically extended based on the configured validity period.

    ValidityTime can be set to 240. Unit: minutes.

    For example, if you obtain the validityTime for the first time and set it to 10 minutes, if you send the request again within 10 minutes, it will be extended by 10 minutes.

    • If the validity period of the token is exceeded, the content of the token is changed only after validityTime is obtained again.

    • If you want to invalidate an access token before it expires, you can send the following POST request. Replace the parameter values based on your business requirements.

      https://das.base.shuju.aliyun.com/api/ac3rdservice/tokenInvalid.json?aliyunId=XXX&accessToken=XXX.

Step2: Embed a dashboard

A dashboard can be embedded only if the dashboard is in the Published state.

  1. On the homepage of the Quick BI console, perform the steps that are shown in the following figure.

    报表嵌入_intl

    On the Report Embedding page, you can view the new report in the list. 1

  2. The embedded configuration.

    Click the image..pngicon in the Actions column. In the Configure Report Embedding dialog box, configure the following settings.

    image..png

    Parameter

    Description

    Embedded Object

    Select the embedded object.

    • If you select Whole Page, the embedded object is the current dashboard.

    • If you select a widget, the embedded object is a widget in the current dashboard.

    Display Configuration

    Specifies whether to carry the title of the current dashboard after embedding.

    Security Authentication Type and Ticket Link

    Select Ticket authentication and generate a Ticket link.

    You can enter the URL of the ticket or click Generate to generate a ticket. .

    image.png

    On the generated ticket page, you can set Bind User, Validity Duration, Watermark Parameters, and Access Times.

    Obtain the embed code

    URL and Iframe are supported.

Step 3: Create a logon-free URL

  1. On the Quick BI homepage, click console Dashboard.

  2. On the Dashboards page, select the third-party report that is embedded in Step 2 and click the 1icon.

    On the dashboard preview page that appears, you can view the URL that points to the dashboard in the address bar.

    Note

    You can change the domain name in the preview URL. For example, the domain name in the preview URL is das.base.shuju.aliyun.com. You can change the domain name to bi.aliyun.com.

  3. Add Step 1: Obtain an accessToken through an HTTPS interface to the URL of the report to view the report without logon.

    Example:

    https://das.base.shuju.aliyun.com/token3rd/dashboard/view/pc.htm?pageId=703d6621-7aa0-4716-bcc1-515e3da794c2&accessToken=XXXXX

Manage embedded reports

For reports that are embedded into third-party systems, you can perform the following operations:

  • Query embedded reports: On the Reports page, enter a report name keyword in the search box and click the 查询icon to query the report.

    You can select a workspace or a report type to narrow down the query range.

  • View the number of embedded reports. For more information, see View the number of embedded reports.

  • Delete an embedded report: Click the icon next to the 删除report to delete the report.

View the number of embedded reports

  1. On the Quick BI product homepage, click Open Platform.

  2. In the left-side navigation pane, click Report Embedding.

    On the Report Embedding page, you can view the number of reports that are embedded in third-party reports. 嵌入数量