Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Creating a shared view with the QuickSight createSharedView API

Focus mode
Creating a shared view with the QuickSight createSharedView API - Amazon QuickSight

After you update the Embedding SDK to version 2.8.0 or higher, use the createSharedView API to create a new shared view. Record the sharedViewId and the dashboardId that the operation returns. The example below creates a new shared view.

const response = await embeddingFrame.createSharedView(); const sharedViewId = response.message.sharedViewId; const dashboardId = response.message.dashboardId;

createSharedView can only be called when a user views a dashboard. For console-specific shared view creation, make sure that users are on the dashboard page before you enable the createSharedView action. You can do this with the PAGE_NAVIGATION event, shown in the example below.

const contentOptions = { onMessage: async (messageEvent, metadata) => { switch (messageEvent.eventName) { case 'CONTENT_LOADED': { console.log("Do something when the embedded experience is fully loaded."); break; } case 'ERROR_OCCURRED': { console.log("Do something when the embedded experience fails loading."); break; } case 'PAGE_NAVIGATION': { setPageType(messageEvent.message.pageType); if (messageEvent.message.pageType === 'DASHBOARD') { setShareEnabled(true); } else { setShareEnabled(false); } break; } } } };
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.