Error while executing the search-dashboards api

Hi QuickSight Team,

We are trying to use the search-dashboards api to filter out the dashboards for a given user arn.

We have referred to the following api documentation -
https://docs.aws.amazon.com/cli/latest/reference/quicksight/search-dashboards.html

Below is the cli command that we were trying to execute.

aws quicksight search-dashboards --aws-account-id <account-id> --filters [{"Name":"QUICKSIGHT_USER","Operator":"StringEquals", "Value": "<ARN of User>"}]

Upon running the above command, we get the following error in AWS CloudShell.

image

Apart from this -

  1. We have tried putting the json in single quotes but it still gives an error
aws quicksight search-dashboards --aws-account-id <account-id> --filters '[{"Name":"QUICKSIGHT_USER","Operator":"StringEquals", "Value": "<ARN of User>"}]'

  1. Tried putting it as a Filters json object as well, but still gives an error
aws quicksight search-dashboards --aws-account-id <account-id> --filters {"Filters":[{"Name":"QUICKSIGHT_USER","Operator":"StringEquals", "Value": "<ARN of User>"}]}

Could you please let me know what is the correct JSON structure body for the filters to be passed to the QuickSight search-dashboards api ?

Thanks and Regards

Hi @tanmay_n

Can you try a syntax similar to the sample below, with the AWS Account ID and username replaced?

aws quicksight search-dashboards --aws-account-id 123456789012 --filters ‘[{“Operator”: “StringEquals”,“Name”:“QUICKSIGHT_OWNER”, “Value”: “arn:aws:quicksight:us-east-1:123456789012:user/default/Raj”}]’

Your second example closely matches this, but I see you got an Internal Server Error. Please check AWS CloudTrail events for that SearchDashboard API event and share the error details, if any.