---
schema_version: "1"
id: 6ea7ae0caec8ddf26b63b927d8e316cce9c8b5d956dd45685e05d8631512c566
title: List Asynchronous Runs of a Report
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/apex_analytics_list_async_runs.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_analytics_list_async_runs.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 56d0290824fca9bd9367fa3c896abebbcbc936789f543e7997ce7113911e744e
description: You can retrieve up to 2,000 instances of a report that you ran asynchronously.
---
# List Asynchronous Runs of a Report

You can retrieve up to 2,000 instances of a report that you ran asynchronously.

The instance list is sorted by the date and time when the report was run. Report results are stored for a rolling 24-hour period. During this time, based on your user access level, you can access results for each instance of the report that was run.

## Example

You can get the instance list by calling the ReportManager.getReportInstances method. For example:

// Get the report ID
List <Report> reportList = \[SELECT Id,DeveloperName FROM Report WHERE
    DeveloperName = 'Closed\_Sales\_This\_Quarter' WITH USER\_MODE\];
String reportId = (String)reportList.get(0).get('Id');

// Run a report asynchronously
Reports.ReportInstance instance = Reports.ReportManager.runAsyncReport(reportId, true);
System.debug('List of asynchronous runs: ' + 
    Reports.ReportManager.getReportInstances(reportId));