Step 4: Embed the Dashboard URL - Amazon QuickSight

Step 4: Embed the Dashboard URL

In the following section, you can find out how you can use the Amazon QuickSight Embedding SDK (JavaScript) to embed the dashboard URL from step 3 in your website or application page. With the SDK, you can do the following:

  • Place the dashboard on an HTML page.

  • Pass parameters into the dashboard.

  • Handle error states with messages that are customized to your application.

Call the GetDashboardEmbedUrl API operation to get the URL that you can embed in your dashboard. This URL is valid for 5 minutes, and the resulting session is valid for 10 hours. The API operation provides the URL with an auth_code that enables a single-sign on session.

The following shows an example response from get-dashboard-embed-url.

//The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", "EmbedUrl": "https: //spaceneedle-alpha.amazon.com/embed/620bef10822743fab329fb3751187d2d...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" }

Embed this dashboard in your webpage by using the Amazon QuickSight Embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), Amazon QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height and width, Amazon QuickSight provides a responsive layout that is modified as your window size changes. By using the Amazon QuickSight Embedding SDK, you can also control parameters within the dashboard and receive callbacks in terms of page load completion and errors.