CreateAnalysis API

Hi,
I’m trying to create an analysis based on another analysis, for testing purposes. From the original analysis I retrieved the JSON by running the describe_analysis_definition function.
original = call.describe_analysis_definition(AwsAccountId, AnalysisId)
When creating the new analysis, I’m passing as parameters:
call.create_analysis(
AwsAccountId=My_AWS_account,
AnalysisId=‘DummyAnalysis’,
Name=‘DummyAnalysis’,
Permissions=Permissions,
Definition=original[‘Definition’],
ThemeArn=original[‘ThemeArn’]
)

  • Permissions is the list of permissions the original analysis has.

I receive the status 202 saying it’s being created, but when I run a call.describe_analysis it says the analysis failed with the following error message:
‘Errors’: [{‘Type’: ‘INTERNAL_FAILURE’, ‘Message’: ‘An error occurred while processing the request’}]

Now, my doubt is if I need to pass some other parameters, such as

  • SourceEntity (which I assumed would come from the Definitions)
  • Parameters (the list of parameters within the original analysis)
    or is this something else?

Hi @EduardoMelo

‘SourceEntity’ is not required when you use a valid ‘Definition’. I have sent you a message to request more details and analyze further.

Best,
Raj

1 Like

Hey @rajjaya, I got it to work. I had to retrieve the parameters’ definition from call.describe_analysis_definition(), parse, create and pass the same parameters to the call.create_analysis(). Wouldn’t it make more sense to have parameters show up in the describe_analysis_definition() the same way as we need to pass them when using create_analysis()?
Anyway, It’s working, now.

Getting Invalid choice: ‘describe-analysis-definition’ when i use aws quicksight describe-analysis-definition --aws-account-id <123456789> --analysis-id