Status check with API

Is there any method to check a dataset/analysis/dashboard is create completed with API?

Hi @liwmin - When you are creating data set by API, it should have a response and in that status is there, if the status is 200 it means it is success.

For data set, please see the below link.

https://boto3.amazonaws.com/v1/documentation/api/1.16.43/reference/services/quicksight.html#QuickSight.Client.create_data_set

Regards - Sanjeeb

1 Like

Thanks Sanjeeb.

I found in some cases, although the status returns 200 (I think it means the HTTP request is return 200) the data source itself still in CREATION_FAILED 0r CREATION_IN_PROGRESS state . The DescribeXXX API doesn’t return the status of the template/datasource and so on. API don’t return this status, but we can use CLI to check this status. I can’t find method to confirm the real status of these resources.

An example of check data source status with CLI:

aws quicksight describe-data-source --aws-account-id xxxxxxxxxxxx --region us-east-1  --data-source-id xxxxxxxxxx
{
    "Status": 200,
    "DataSource": {
        "Arn": "hhhhhhhhhhhhhhhhh",
        "DataSourceId": "xxxxxxxxxxx",
        "Name": "xxxxxxx",
        "Type": "REDSHIFT",
        "Status": "CREATION_SUCCESSFUL",
        "CreatedTime": "2023-05-17T10:33:17.033000+00:00",
        "LastUpdatedTime": "2023-05-17T10:33:17.414000+00:00",
        "DataSourceParameters": {
            "RedshiftParameters": {
                "Host": "zzzzzzzzzzzzzzz",
                "Port": 5439,
                "Database": "nnnnnnn"
            }
        },
        "VpcConnectionProperties": {
            "VpcConnectionArn": "xxxxxxxx"
        },
        "SslProperties": {
            "DisableSsl": false
        }
    },
    "RequestId": "28a9d229-40d9-4f1d-af7d-3bed6f00f7e1"
}
1 Like

Hi @liwmin - The status - CREATION_SUCESSFUL means the data source is created successful. You can validate it in QuickSight UI as well.

Regards - Sanjeeb

Hi @Sanjeeb2022,

When you are creating data set by API, it should have a response and in that status is there, if the status is 200 it means it is success.

The status 201 that you get when using the API to create a dataset just tells you the request was successful. It doesn’t actually mean QuickSight has finished creating it. You get status 201 right away but creation of the dataset could finish minutes later. It may even fail if it runs into other issues.

1 Like

Thanks @David_Wong for the insights.

Regards - Sanjeeb