How to retrieve the analysis ID from dashboard

How to retrieve the analysis ID from dashboard.

Hi,

I have a couple of dashboards that were created sometime ago by some users.
We wanted to make some edits to these dashboards – but we cant seem to locate the analyses that were used to build these dashboards, let alone share those analyses.

Please help us.
Thank you

Hi, you can use describe-dashboard API to get the linked entities

https://docs.aws.amazon.com/quicksight/latest/APIReference/API_Dashboard.html#QS-Type-Dashboard-LinkEntities

Hope this helps!

1 Like

So actually i also found out the solution.
This is what i did.

# make sure to change to your region where the dashboard resides in
# client = boto3.client('quicksight', region_name='*')

# Find dashboard
# Get the dashboard id so you can later describe it
# response = client.search_dashboards(
#     AwsAccountId=aws_account_id,
#     Filters=[
#         {
#             'Operator': 'StringLike',
#             'Name': 'DASHBOARD_NAME',
#             'Value': '*'
#         },
#     ]
# )

# Describe the dashboard
# You can find the analysis id here. Look for analysis/*
# response = client.describe_dashboard(
#     AwsAccountId=aws_account_id,
#     DashboardId='*'
# )

# Describe_analysis_permissions
# response = client.describe_analysis_permissions(
#     AwsAccountId=aws_account_id,
#     AnalysisId='*'
# )

# Describe_analysis
# response = client.describe_analysis(
#     AwsAccountId=aws_account_id,
#     AnalysisId='*'
# )

# if you need to grant access permissions to analysis
# response = client.update_analysis_permissions(
#     AwsAccountId=aws_account_id,
#     AnalysisId='*',
#     GrantPermissions=[
#         {
#             'Principal': '*',
#               "Actions": [
#                 "quicksight:RestoreAnalysis",
#                 "quicksight:UpdateAnalysisPermissions",
#                 "quicksight:DeleteAnalysis",
#                 "quicksight:DescribeAnalysisPermissions",
#                 "quicksight:QueryAnalysis",
#                 "quicksight:DescribeAnalysis",
#                 "quicksight:UpdateAnalysis"
#               ]
#         },
#     ]
# )