

# Analysis operations


With analysis API operations, you can perform actions on Amazon Quick Sight analyses. For more information, see the following API operations.

**Topics**
+ [

# Analysis permissions operations
](analysis-permissions.md)
+ [

# CreateAnalysis
](create-analysis.md)
+ [

# DeleteAnalysis
](delete-analysis.md)
+ [

# DescribeAnalysis
](describe-analysis.md)
+ [

# ListAnalyses
](list-analyses.md)
+ [

# RestoreAnalysis
](restore-analysis.md)
+ [

# SearchAnalyses
](search-analyses.md)
+ [

# UpdateAnalysis
](update-analysis.md)

# Analysis permissions operations


With analysis permissions API operations, you can view and update permissions for analyses. For more information, see the following API operations.

**Topics**
+ [

# DescribeAnalysisPermissions
](describe-analysis-permissions.md)
+ [

# UpdateAnalysisPermissions
](update-analysis-permissions.md)

# DescribeAnalysisPermissions


Use the `DescribeAnalysisPermissions` API operation to view the read and write permissions for an analysis. To use this operation, you need the ID of the analysis whose permissions you want to view. The analysis ID is part of the analysis URL in Quick Sight. You can also use the `ListAnalyses` API operation to get the ID.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight describe-analysis-permissions 
    --aws-account-id 555555555555 
    --analysis-id ANALYSISID
```

------

For more information about the `DescribeAnalysisPermissions` API operation, see [DescribeAnalysisPermissions](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeAnalysisPermissions.html) in the *Amazon Quick Sight API Reference*.

# UpdateAnalysisPermissions


Use the `UpdateAnalysisPermissions` API operation to update the read and write permissions for an analysis. You can grant or revoke permissions in the same command. To use this operation, you need the ID of the analysis whose permissions you want to update. The analysis ID is part of the analysis URL in Quick Sight. You can also use the `ListAnalyses` API operation to get the ID.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight update-analysis-permissions 
    --aws-account-id 555555555555 
    --analysis-id ANALYSISID
    --grant-permissions Principal=arn:aws:quicksight:us-east-1:AWSACCOUNTID:user/default/USERNAME,Actions=quicksight:RestoreAnalysis,quicksight:UpdateAnalysisPermissions,quicksight:DeleteAnalysis,quicksight:QueryAnalysis,quicksight:DescribeAnalysisPermissions,quicksight:DescribeAnalysis,quicksight:UpdateAnalysis 
    --revoke-permissions Principal=arn:aws:quicksight:us-east-1:555555555555:user/default/USERNAME,Actions=quicksight:RestoreAnalysis,quicksight:UpdateAnalysisPermissions,quicksight:DeleteAnalysis,quicksight:QueryAnalysis,quicksight:DescribeAnalysisPermissions,quicksight:DescribeAnalysis,quicksight:UpdateAnalysis
```

If your `region` has already been configured within the CLI, it doesn't need to be included as an argument.

You can also make this command using a CLI skeleton file with the following command. For more information about CLI skeleton files, see [Use CLI skeleton files](cli-skeletons.md).

```
aws quicksight update-analysis-permissions
    --cli-input-json file://updateanalysispermissions.json
```

------

If your region has already been configured with the CLI, it does not need to be included in an argument.

For more information about the `UpdateAnalysisPermissions` API operation, see [UpdateAnalysisPermissions](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateAnalysisPermissions.html) in the *Amazon Quick Sight API Reference*.

# CreateAnalysis


Use the `CreateAnalysis` API operation to create an analysis in Amazon Quick Sight for a specified user. Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight create-analysis
    --aws-account-id AWSACCOUNTID
    --analysis-id ANALYSISID
    --name NAME
    --source-entity SOURCEENTITY
```

You can also make this command using a CLI skeleton file with the following command. For more information about CLI skeleton files, see [Use CLI skeleton files](cli-skeletons.md).

```
aws quicksight create-analysis
    --cli-input-json file://createanalysis.json
```

------

For more information about the `CreateAnalysis` API operation, see [CreateAnalysis](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateAnalysis.html) in the *Amazon Quick Sight API Reference*.

# DeleteAnalysis


Use the `DeleteAnalysis` API operation to delete an analysis from Amazon Quick Sight for a specified user. To use this operation, you need the ID of the analysis that you want to delete. The analysis ID is part of the analysis URL in Quick Sight. You can also use the `ListAnalyses` API operation to get the ID.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight delete-analysis 
    --aws-account-id 555555555555 
    --analysis-id ANALYSISID
```

------

For more information about the `DeleteAnalysis` API operation, see [DeleteAnalysis](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DeleteAnalysis.html) in the *Amazon Quick Sight API Reference*.

# DescribeAnalysis


Use the `DescribeAnalysis` API operation to view a summary of the metadata for an analysis for a specified user. To use this operation, you need the ID of the analysis that you want to describe. The analysis ID is part of the analysis URL in Quick Sight. You can also use the `ListAnalyses` API operation to get the ID.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight describe-analysis 
    --analysis-id ANALYSISID 
    --aws-account-id 555555555555
```

------

For more information about the `DescribeAnalysis` API operation, see [DescribeAnalysis](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeAnalysis.html) in the *Amazon Quick Sight API Reference*.

# ListAnalyses


Use the `ListAnalyses` API operation to list Amazon Quick Sight analyses that exist in the specified AWS account. Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight list-analyses 
    --aws-account-id 555555555555 
    --page-size 10 
    --max-items 10
```

------

For more information about the `ListAnalyses` API operation, see [ListAnalyses](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ListAnalyses.html) in the *Amazon Quick Sight API Reference*.

# RestoreAnalysis


Use the `RestoreAnalysis` API operation to restore an analysis for a specified user. To use this operation, you need the ID of the analysis that you want to restore. The analysis ID is part of the analysis URL in Quick Sight. You can also use the `ListAnalyses` API operation to get the ID.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight restore-analysis 
    --analysis-id ANALYSISID 
    --aws-account-id 555555555555
```

------

For more information about the `RestoreAnalysis` API operation, see [RestoreAnalysis](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_RestoreAnalysis.html) in the *Amazon Quick Sight API Reference*.

# SearchAnalyses


Use the `SearchAnalyses` API operation to search for analyses that belong to the specified user. Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight search-analyses 
    --aws-account-id 555555555555 
    --filters Operator=StringEquals,Name=QUICKSIGHT_USER,Value=arn:aws:quicksight:us-east-1:555555555555:user/default/USERNAME 
    --page-size 10 
    --max-items 100
```

If your `region` has already been configured within the CLI, it doesn't need to be included as an argument.

------

If your region has already been configured with the CLI, it does not need to be included in an argument.

For more information about the `SearchAnalyses` API operation, see [SearchAnalyses](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_SearchAnalyses.html) in the *Amazon Quick Sight API Reference*.

# UpdateAnalysis


Use the `UpdateAnalysis` API operation to update an analysis in Amazon Quick Sight. To use this operation, you need the ID of the analysis that you want to update. The analysis ID is part of the analysis URL in Quick Sight. You can also use the `ListAnalyses` API operation to get the ID.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight update-analysis 
    --aws-account-id 555555555555 
    --analysis-id ANALYSISID 
    --name NAME 
    --source-entity '{"SourceTemplate":{"DataSetReferences":[{"DataSetPlaceholder":"PLACEHOLDER","DataSetArn":"arn:aws:quicksight:us-west-2:555555555555:dataset/DATASETID"}],"Arn":"arn:aws:quicksight:us-west-2:555555555555:template/TEMPLATEID"}}' 
    --theme-arn THEMEARN
```

If your `region` has already been configured within the CLI, it doesn't need to be included as an argument.

You can also make this command using a CLI skeleton file with the following command. For more information about CLI skeleton files, see [Use CLI skeleton files](cli-skeletons.md).

```
aws quicksight update-analysis
    --cli-input-json file://updateanalysis.json
```

------

If your region has already been configured with the CLI, it does not need to be included in an argument.

For more information about the `UpdateAnalysis` API operation, see [UpdateAnalysis](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateAnalysis.html) in the *Amazon Quick Sight API Reference*.