How to get SnapshotJobId for using snapshot apis

For this api,

response = client.describe_dashboard_snapshot_job(
    AwsAccountId='string',
    DashboardId='string',
    SnapshotJobId='string'
)

From where do I get this SnapshotJobId?

I tried getting it from the Schedules pane by clicking ‘Details’

but when I use it to make this api call, it is throwing an error:
botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the DescribeDashboardSnapshotJobResult operation: Requested dashboard snapshot job could not be found.

Hi @lakshmisruthi and welcome to the QuickSight community!
To get the SnapshotJobId, you will need to use the start_dashboard_snapshot_job API to create one:

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/quicksight/client/start_dashboard_snapshot_job.html

Let me know if you have any additional questions!

Hi @Brett ,

Thankyou for your response.

My purpose is to pause and unpause snapshot email schedules via API (dependent on another task), which, until now, we have been doing manually on UI. As far as I’ve seen I could not find any API for that. (If there is please let me know). So I am searching for ways to start the email schedule via API.

I found this start_dashboard_snapshot_job_schedule which is able to send the email.

response = client.start_dashboard_snapshot_job_schedule(
    AwsAccountId='string',
    DashboardId='string',
    ScheduleId='string'
)

Now, I need to get the status of this API call. For that should I use describe_dashboard_snapshot_job_result? If yes, where do I get the SnapshotId for this?
If not please let me know what I should use to get the status…

Hi @lakshmisruthi,
Recently, there have been some other posts that have been interested in similar functionality of the email schedules, I’m not sure if this is currently an available option.
Check out the start-dashboard-snapshot-job-schedule API, to see if this can assist in what you’re looking to achieve. If not, I’m afraid this may not currently be available and I can mark as a feature request.

Thank you!

Hi @lakshmisruthi,
Following up here as it’s been awhile since we last heard from you. Did you have any additional questions regarding your initial post?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi Brett,

I have mentioned this API only in my previous response
start_dashboard_snapshot_job_schedule
I need a way to continuously check the status until it’s completed. Right now, when I call it, I get a result if it’s done, but if it’s still in progress, it returns a 202 status. I want to keep checking until it’s finished. Please guide me on how to do that.

And please mark stopping emails via API as a feature request. Thankyou for your response!

Hi @lakshmisruthi,
I’ve marked this as a feature request to promote visibility to the AWS support team.

Let us know if you have any additional comments or questions. If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you

Hi @lakshmisruthi,
As I’ve already marked this as a feature request and we have not heard back any further, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community.

Thank you!