How to call ListDashboards for a given namespace

0

We want to provide a service which embeds dashboard in a custom web app that different customers can log in to, using API Gateway, Cognito, Lambda and Quicksight.

According to the documentation ("Embed multi-tenant analytics in applications with Amazon QuickSight") I can publish dashboards on a per-customer (namespace) basis. As an example we are looking to publish dashboards as follows:

  • Customer 1: Dashboard A, Dashboard B, Dashboard C
  • Customer 2: Dashboard B, Dashboard C, Dashboard D

If Customer 2 logs in to our webapp, how do we call "ListDashboards" and pass in the namespace that they belong to, so they only see Dashboards B, C, and D (and not Dashboard A)

3 Answers
0

Could you uses aliases or some other logic? ListDashboards will retrieve all dashboards and doesn't support filtering.

An important note about namespaces:

QuickSight assets and resources, including datasets, data sources, dashboards, analyses, and so on, exist outside of any namespace. They are visible only to users who have resource permissions granted to them.

So you'll have to use some logic either from DescribeUser and cross-reference the namespace.

AWS
EXPERT
Raphael
answered 2 years ago
AWS
EXPERT
Parnab
reviewed 2 years ago
0

Use the DescribeDashboardPermissions API call to retrieve the permissions From that you will need to simulate the same logic that quicksight uses to determine if the current user would have permissions. This may be quite difficult to do depending on how you are managing permissions.

Alternatively, you could make use of shared folders. There is recently an addition to the API that supports creation and query of shared folders. Included is an api to list the contents of shared folders.

Alternatively, using the role that the user in question would use, one by one issue a "DescribeDashboard" request and use the result status (succcess or error) to determine if the user has read permissions.

DALDEI
answered 2 years ago
0

Did you look into SearchDashboards API? If you pass a user filter (Name = "QUICKSIGHT_USER"), the API returns the list of dashboards that the user has permissions to view.

As an alternative, you can use AWS resource tagging feature by tagging the dashboards with namespace name using TagResource API, and calling GetResources API to get the resources for required namespace. Tagging will have to be managed separately from dashboard permissions though.

As a side note - Dashboards are namespace-agnostic resources, but can be shared with any namespace (i.e. all users in specific namespace), or specific users from any namespace.

AWS
Vijay
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions